How to run the extension in the debugger - PeterWone/vscode-arduino-cli GitHub Wiki

  1. If the extension is installed from a VSIX then uninstall it.
  2. If you don't already have the repo then clone it to your machine.
  3. Load the extension project into VS Code.
  4. Get your dependencies using npm i
  5. Switch to debugging and choose "Run extension" then press F5 or click the run button.

image

  1. Another instance of VS Code will start in a special mode with the extension "installed". You can set breakpoints and so forth in the extension code and interact with it.

image

Interactive debugging is essential for figuring out why exceptions aren't being handled, or (hardest to debug) handled incorrectly leading to weird behaviour.