vscode: Web: extension host debugging (JS) does not work

Steps to Reproduce:

  1. macOS, Chrome
  2. npm install -g yo
  3. npm install -g generator-code
  4. yo code
  5. end-js (JS template)
  6. ./resources/server/web.sh --folder /Users/bpasero/Desktop/end-js
  7. add breakpoint into the hello world command handler
  8. Run
  9. trigger “hello world”

=> 🐛 breakpoint not hit

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (18 by maintainers)

Commits related to this issue

Most upvoted comments

I can reliably reproduce this problem both with TS and JS extensions by enabling early extension activation with the wildcard activation event (“*”).

With this I never hit a breakpoint in the activation method with js-debug, but I always hit it with node-debug2.

Since this problem only occurs in the Web, I think we can swallow it in this milestone. But we need to fix it in June.

(Using “inspector.waitForDebugger()” might be one solution to solve the problem, but I do not want to add this new code today).

This seems to be an issue with js-debug. Turning the new JS debugger off with the setting "debug.javascript.usePreview": false makes it work for me.

@connor4312 if a fix for this is more involved, I suggest to force js-debug being disabled for this scenario.