question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS Code 1.47.0 No Longer Able to Attach Node.js Debugger

See original GitHub issue

Describe 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:

  1. Windows 10
  2. Upgrade VS Code to 1.47.0
  3. Press F5 in VS Code
  4. 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:closed
  • Created 3 years ago
  • Reactions:18
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
connor4312commented, Aug 24, 2020

Please open a new issue using the issue template.

2reactions
massimedducommented, Jul 11, 2020

This should be fixed in the new nightly release which I’ve manually triggered.

I can confirm that the nightly extension fixes the issue. Thank you for the quick fix!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found