First of all, you should familiarize yourself with the debugging architecture of VS Code and the Firefox Remote Debugging Protocol.
- fork and clone this repository and open it in VS Code
- run
npm install
- run
npm run watch
or start thewatch
task in VS Code - optional but recommended: run
npm run typecheck-watch
or start thetypecheck-watch
task in VS Code
Most source folders contain a README
file giving an overview of the contained code.
Start with the top-level README.
This repository contains several launch configurations for debugging different parts of the code:
- to debug the debug adapter itself (i.e. the code under
src/adapter/
), use thedebug server
configuration to start it as a stand-alone server in the node debugger. Then open a web application in a second VS Code window and add a launch configuration of typefirefox
to it. Add"debugServer": 4711
to this launch configuration, so that VS Code will use the debug adapter that you just launched in the other VS Code window. Set a breakpoint in thestartSession()
ofFirefoxDebugAdapter
and start debugging the web application. - to debug the extension code (under
src/extension/
), use theextension host
configuration. It will open a second VS Code window with the extension in it running in the node debugger. - the compound configuration
server & extension
will launch both of the configurations above - the
web test
andwebextension test
configurations can be used if you need to manually reproduce the mocha tests. You'll need to start thedebug server
configuration first.