VS Code 1.47.0 No Longer Able to Attach Node.js Debugger
See original GitHub issueDescribe the bug After upgrading to VS Code 1.47.0, I am no longer able to attach my Node.js debugger in VS Code. The following error is displayed:
Error processing attach: Error: Could not connect to debug target at http://[Redacted]:5859: Could not find any debuggable target\n\tat e (c:\\Users\\[Redacted]\\.vscode\\extensions\\ms-vscode.js-debug-nightly-2020.7.1017\\src\\extension.js:15:2438843)\n\tat processTicksAndRejections (internal/process/task_queues.js:85:5)
I also tried the ms-vscode-js-debug
nightly build but the error occurred for both.
To Reproduce Steps to reproduce the behavior:
- Windows 10
- Upgrade VS Code to 1.47.0
- Press F5 in VS Code
- See error
Log File
{"tag":"runtime.launch","timestamp":1594449604718,"message":"Launch returned error","metadata":{"error":{"message":"Could not connect to debug target at http://[Redacted]:5859: Could not find any debuggable target","stack":"Error: Could not connect to debug target at http://[Redacted]:5859: Could not find any debuggable target\n\tat e (c:\\Users\\[Redacted]\\.vscode\\extensions\\ms-vscode.js-debug-nightly-2020.7.1017\\src\\extension.js:15:2438843)\n\tat processTicksAndRejections (internal/process/task_queues.js:85:5)"},"wasCancelled":true,"name":"y"},"level":2}
{"tag":"dap.send","timestamp":1594449604718,"metadata":{"connectionId":1,"message":{"seq":30,"type":"response","request_seq":2,"command":"attach","success":false,"body":{"error":{"id":9221,"format":"Error processing attach: Error: Could not connect to debug target at http://[Redacted]:5859: Could not find any debuggable target\n\tat e (c:\\Users\\[Redacted]\\.vscode\\extensions\\ms-vscode.js-debug-nightly-2020.7.1017\\src\\extension.js:15:2438843)\n\tat processTicksAndRejections (internal/process/task_queues.js:85:5)","showUser":false,"sendTelemetry":false}}}},"level":0}
{"tag":"dap.receive","timestamp":1594449604723,"metadata":{"connectionId":1,"message":{"command":"disconnect","arguments":{"restart":false},"type":"request","seq":26}},"level":0}
{"tag":"dap.send","timestamp":1594449604724,"metadata":{"connectionId":1,"message":{"seq":31,"type":"response","request_seq":26,"command":"disconnect","success":true,"body":{}}},"level":0}
{"tag":"dap.send","timestamp":1594449609724,"metadata":{"connectionId":1,"message":{"seq":32,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/dap/operation","data":{"errors":[],"disconnect":{"operation":"disconnect","totalTime":0.8,"max":0.8,"avg":0.8,"stddev":null,"count":1,"failed":0},"!disconnect.errors":[]}}}},"level":0}
VS Code Version: 1.47.0
Additional context
Here is the launch.json
configuration that is used:
{
"type": "node",
"request": "attach",
"name": "Worker",
"address": "[Redacted]",
"port": 5859,
"restart": true,
"localRoot": "${workspaceRoot}",
"remoteRoot": "[Redacted]",
"protocol": "inspector",
"skipFiles": [
"<node_internals>/**/*.js"
]
}
I am able to attach the debugger after setting debug.javascript.usePreview
to false
in settings.json
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:18
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Debug Node.js Apps using Visual Studio Code
The Visual Studio Code editor includes Node.js debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >June 2020 (version 1.47) - Visual Studio Code
New JavaScript debugger - Debug in the terminal, profiling support. ... The command is not bound to any keyboard shortcut by default, but...
Read more >August 2021 (version 1.60) - Visual Studio Code
JavaScript debugging Last year we introduced a new debugger for Node. js and Chrome, and since VS Code 1.47 (July 2020) it...
Read more >Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >Build Node.js Apps with Visual Studio Code
The Visual Studio Code editor has great support for writing and debugging Node.js applications. This tutorial takes you from Hello World to a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please open a new issue using the issue template.
I can confirm that the nightly extension fixes the issue. Thank you for the quick fix!