Vscode-js-debug: New JavaScript Debugger stuck since VS Code version 1.47

Created on 27 Aug 2020  路  16Comments  路  Source: microsoft/vscode-js-debug

Configuration in launch.json:
{ "name": "Attach to API Module", "type": "node", "request": "attach", "port": 9230, "restart": true, "sourceMaps": true, "protocol": "inspector", "timeout": 60000, "skipFiles": ["<node_internals>/**/*.js"], "trace": true, }

Starting node:
2020-08-27 11_47_08-

After attaching Debugger it shows:
2020-08-27 11_50_51-GitHub - microsoft_vscode-js-debug_ The VS Code JavaScript debugger

Then the console is stuck completely.
No breakpoint stops.
Disconnect doesn't work.
The node server itself just works fine.
With earlier Versions ( <= 1.46 ) debugging was possible.

Log File
vscode-debugadapter-1.json.gz

VS Code Version: 1.47

Additional context
Environment:
Running VS Code in WSL on Windows
Linux 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux

bug needs more info

All 16 comments

Update
I deleted temporarily the launch.json.
I tried to create a new launch.json with one single config -> no success

After that I delete launch.json again.
And I've found a workaround.

After that I tried this:
image
If I start this:
image
Many "Debugger attached" lines appear in the console...
image
and finally, I was able to debug.

What is the difference in launching via launch.json and "Run script: xxx" debugging.
Refer to: https://github.com/microsoft/vscode-js-debug#easy-npm-script-debugging

If you need any further information, feel free to contact me.
BR Mario

Edit
Another Workaround seems to be:
Start the debugger process first, this is waiting for server starting up.
After that i started the server and the debugger attached - not stuck and it works:
image

Really strange.
If I stop the debug session and launch again -> same behaviour as I wrote in the bug description.

Thanks for the issue. What version of Node.js are you using?

Hi connor4312, I am using v12.18.3.

Hm, okay. This looks like https://github.com/microsoft/vscode-js-debug/issues/649 -- for them, updating to a recent Node version fixed the issue. If you're able to, could you try updating (latest version is 14.7.0) and see if that fixes the issue?

Hi, I tried to update and use the latest version of node (14.10.1).
Unfortunately in my project I am strictly bound to the latest LTS version of Node (12).
Is there anything else I could try / do?

I can confirm that even 'hello world' example from https://code.visualstudio.com/docs/editor/debugging and youtube tutorial (0-1:20) doesn't work as described with node v10 using nvm, but works fine with v12 also with nvm on ubuntu 18.04. For me it's not solution to switch for the new version of nodejs.
Version: 1.49.2 Commit: e5e9e69aed6e1984f7499b7af85b3d05f9a6883a Date: 2020-09-24T16:26:09.944Z Electron: 9.2.1 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Linux x64 4.15.0-118-generic

@EugenIvanou please collect a trace log using the instructions in the issue template:

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

鈿狅笍 This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to [email protected]

@connor4312 thanks, for the answer, the trace below
vscode-debugadapter-3.json.gz

Thanks, I see you're running nvm, so are you able to easily try on the latest 10.x, e.g. 10.22.1? If I recall there were a couple point releases in 10.x where things were broken, though I don't reproduce any issues on Ubuntu running 10.16.0 myself.

@connor4312 I've checked 10.22.1 and it's working fine, thanks.

Okay, gotcha. I'll add that to our COMMON_PROBLEMS.md -- this had come up before but I couldn't find the issue. Glad you got it working.

Also, @iDschepe I just saw that you're on a pretty old release. I would update to a recent VS Code release, we've made dozens of fixes since the new debugger first debuted in 1.47. There's a decent chance that what you're hitting was already fixed.

Hi @connor4312,
thanks for coming back. I updated VS Code to the latest, unfortunately I still get the same issue.
image

Hm, okay. From what you shared previously, this seems like either some issue in Node.js or (less likely) some esoteric firewall/proxy problem, so I'm not sure if there's more we can do here.

@ret394 if you are running into a problem, please open a new issue using the template. I invite you to also read through the Microsoft OSS Code of Conduct under which is this project and others are governed. Thanks!

I am going to close this issue. It seems like the issue reporter found a workaround, and the initial bug appears to be an issue in Node.js. I haven't been able to reproduce this locally and the issue reporter isn't able to update, so I don't want to upstream this issue to Node when it's reported on both and old version and without reproducible steps.

If, when you are eventually able to update Node, you still run into this problem, let me know and I can help investigate future and raise an issue with the Node team.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelhyman picture michaelhyman  路  5Comments

KieranHarper picture KieranHarper  路  5Comments

jtsom picture jtsom  路  8Comments

Skuriles picture Skuriles  路  5Comments

auchenberg picture auchenberg  路  3Comments