Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 2.13 KB

File metadata and controls

53 lines (37 loc) · 2.13 KB

Debugger Client

The Debugger client is responsible for managing the communication between the client application and JS server.

  • When the server sends a notification to the client, the client receives an "event" and notifies the application via redux actions.
  • When the application, wants to send a command to the server, it invokes "commands" in the client.

The Debugger supports a Firefox and a Chrome client, which lets it attach and debug Firefox, Chrome, and Node contexts. The clients are defined in src/client and have an onConnect function, and a commands and events module.

Both clients implement client adapters for translating commands and events into JSON packets. The chrome client debugger adapter is defined in chrome-remote-interface. The Firefox client adapters are defined in two places:

Firefox

Remote Debugger Protocol

The Remote Debugger Protocol specifies the client / server API.

Interrupt

When the client wants to add a breakpoint, it avoids race conditions by doing temporary pauses called interrupts.

We want to do these interrupts transparently, so we've decided that the client should not notify the application that the thread has been paused or resumed.

Chrome

Chrome Debugger Protocol

The chrome debugger protocol is available here. And is maintained in the devtools-protocol repo.