Matias Snellingen
Matias Snellingen

Reputation: 823

Node debugging in Visual Studio Code is unable to start

Running a simple node debugging session on visual studio code fails with the message:

Program 'node.dll' failed to run: No application is associated with the specified file

This is the message from Debug Console:

C:\Users\<USERNAME>\AppData\Local\Programs\Microsoft VS Code\node.dll --inspect-brk=12232 probe.js 
Error processing "launch": Error: spawn UNKNOWN
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn (child_process.js:514:9)
    at NodeDebugAdapter.launchInInternalConsole (c:\Users\<USERNAME>\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ms-vscode.node-debug2\out\src\nodeDebugAdapter.js:311:32)
    at NodeDebugAdapter.<anonymous> (c:\Users\<USERNAME>\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ms-vscode.node-debug2\out\src\nodeDebugAdapter.js:190:28)
    at Generator.next (<anonymous>)
    at fulfilled (c:\Users\<USERNAME>\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ms-vscode.node-debug2\out\src\nodeDebugAdapter.js:7:58)
    at <anonymous>

Re-installing Visual Studio Code temporary fixes the problem so that I am able to launch the debugging session, but I still this error message on every launch:

enter image description here

If I close visual studio code and start it again, it is back to not working with the same error message. My launch.json looks like this:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceFolder}\\probe.js",
            "console": "integratedTerminal"
        }
    ]
}

Any way to fix this issue permanently?

Upvotes: 0

Views: 859

Answers (1)

Sagar
Sagar

Reputation: 4957

This solution perfectly works fine for me. enter image description here

Upvotes: 1

Related Questions