vscode: Web: extension host debugging (JS) does not work
Steps to Reproduce:
- macOS, Chrome
npm install -g yo
npm install -g generator-code
yo code
end-js
(JS template)./resources/server/web.sh --folder /Users/bpasero/Desktop/end-js
- add breakpoint into the hello world command handler
- Run
- 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
- debug: try to wait for a debugger before running extensions Fixes #106698 Fixes #99222 — committed to microsoft/vscode by connor4312 4 years ago
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.