The VS Code Firefox debug extension (https://github.com/firefox-devtools/vscode-firefox-debug)
currently uses Firefox's proprietary Remote Debugging Protocol (RDP) over a raw TCP socket.
This analysis assesses whether WebDriver BiDi (specifically the moz:debugging module) could
replace it.
| Feature | How |
|---|---|
| Line/column breakpoints (set/remove) | moz:debugging.setBreakpoint / removeBreakpoint |
| Stepping (into/over/out/resume) | moz:debugging.stepInto/stepOver/stepOut/resume |
| Paused event with call frames + scope chain | moz:debugging.paused event |
| JS evaluation in paused frame | script.evaluate / script.callFunction (auto-targets paused frame) |
| Object inspection with stable handles | BiDi remote object references (serialized objects have unique IDs) |
| Script source retrieval | moz:debugging.getScriptSource |
| Script enumeration | moz:debugging.listScripts |
| Console output monitoring | log.entryAdded event |
- Conditional breakpoints —
moz:debugging.setBreakpointhas noconditionparameter. Agreed to add; not yet implemented. - Logpoints — No native BiDi equivalent. RDP supports
type: 'logMessage'on breakpoints.
- Breakable locations query — RDP source actors advertise exact breakable line/column offsets, which the extension uses for reliable inline breakpoint placement. No BiDi equivalent.
- Blackboxing / skip files — No BiDi equivalent for
blackbox/unblackboxon sources.
- Data breakpoints / watchpoints — No BiDi equivalent for observing property mutation
(get/set). RDP exposes this via object actor
addWatchpoint/removeWatchpoint. - Web Worker debugging — Unclear whether
moz:debuggingscope covers worker globals. - WebExtension debugging — Addon/extension page targeting not in BiDi.
- Event breakpoints — No BiDi equivalent for breaking on DOM/XHR/timer events.
- Transport: The extension uses a raw TCP socket; BiDi uses WebSocket. Not a capability gap but requires rewriting the connection layer.
- Known conflict:
moz:debuggingusesjsInspector.enterNestedEventLoop(), which conflicts with the DevTools debugger running simultaneously (bug 2041335). Needs resolution before both can coexist. - A full replacement would use multiple BiDi modules together:
moz:debuggingfor stepping,script.*for evaluation,log.*for console — not a single drop-in.