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 watchor start thewatchtask in VS Code - optional but recommended: run
npm run typecheck-watchor start thetypecheck-watchtask 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 serverconfiguration 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 typefirefoxto it. Add"debugServer": 4711to 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()ofFirefoxDebugAdapterand start debugging the web application. - to debug the extension code (under
src/extension/), use theextension hostconfiguration. It will open a second VS Code window with the extension in it running in the node debugger. - the compound configuration
server & extensionwill launch both of the configurations above - the
web testandwebextension testconfigurations can be used if you need to manually reproduce the mocha tests. You'll need to start thedebug serverconfiguration first.