Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
JSDT/Debug/Rhino/Rhino Debug Wire Protocol
JSDT Debug | |
Website | |
Download | |
Community | |
Mailing List • Forums • IRC • mattermost | |
Issues | |
Open • Help Wanted • Bug Day | |
Contribute | |
Browse Source • Project Set File |
Contents
Overview
The Rhino Debug Wire Protocol (RDWP) is an adapted version of the v8 protocol using JSON to communicate with the remote Rhino debugger.
The RDWP was chosen to be JSON-based for a few reasons:
- It can be more easily extended to add new events, requests or responses.
- It is easier to understand by consumers
- It follows the de-facto JSON standard, which could allow it to communicate with other JSON-based efforts.
Packets
The RDWP performs all communication with the remote debugger using packets over a socket. The payload of each packet is the JSON string describing the event, request or response with a preamble containing the content length and a line terminator.
For example all packets follow the general form:
<content_length> \r\n\ { "type":<packet_type>, "seq":<integer>, "body":{} }
Event
Event packets are sent to the client from the VM only when the client as created an event request for a given event. Event packets are not broadcast to all clients, only those that have requested them.
All event packets have the general form:
<content_length> \r\n { "type":"event", "seq":<packet_sequence>, "event":<event_type>, "body":{} }
The complete list of events that can be used in <event_type>
are available in the Events section below
Request
A request packet is used to ask the VM to perform some operation. The compete listing of requests that can be made is available in the Request section below.
All request packets have the general form:
<content_length> \r\n { "command"=<command>, "type"="request", "seq"=<packet_sequence>, "arguments"={<argument_list>} }
A complete listing of values that can be used in <command>
are available in the Requests section below.
Response
A response packet is sent by the VM an corresponds directly to a request packet that has been sent. Response packets are never sent if a request has not been made.
All response packets are of the form:
<content_length> \r\n { "command":<command>, "type":"response", "request_seq":<request_sequence>, "seq":<packet_sequence>, "running":<is_running>, "success":<success_status>, "body":{} }