How to debug a VS Code extension when loaded from VSIX?

Viewed 534

I have a vs code extension (currently private), and it runs fine when I run it via the VS Code debugger, (i.e., a "Launch Extension" target in my launch.json). However, when I install the extension from a vsix file, the extension never activates.

Here's what I tried:

  • View elements & commands show up, which implies the package.json is being read correctly.
  • I placed vscode.window.showInformationMessage(...) statements in my extension.js and extension.js's activate() methods. I see expected output when I launch via VS Code debugger, but not when installed via vsix file.
  • I changed the activation events to include "onLanguage:javascript", hoping that opening a js file would cause my extension to activate, but it didn't.

A few questions:

  • Any suggestions on what is going on here?
  • Any suggestions on how to debug this?
  • Any instructions on how I can attach a debugger?
0 Answers
Related