Steps to Reproduce:
Run debugger. Visual Studio Code doesn't start debugger (seems, tries to execute node.exe from HPC package) DEBUG CONSOLE output:
node --debug-brk=37183 --nolazy app.js Node Commands
Syntax: node {operator} [options] [arguments]
Parameters: /? or /help - Display this help message. list - List nodes or node history or the cluster listcores - List cores on the cluster view - View properties of a node online - Set nodes or node to online state offline - Set nodes or node to offline state pause - Pause node [deprecated] resume - Resume node [deprecated]
For more information about HPC command-line tools, see http://go.microsoft.com/fwlink/?LinkId=120724.
launch.json content:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/app.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
},
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"processId": "${command.PickProcess}",
"port": 5858,
"sourceMaps": false,
"outDir": null
}
]
}
VSC developer suggests next possible ways:
- change your PATH so that the correct 'node' will be found first. You can verify which node is found on the path by running
where node
in a command prompt.- find the correct 'node' on your system and then add a
runtimeExecutable
attribute with the absolute path to your 'node' to your launch config
I updated launch.json file and it solved the issue
"runtimeExecutable": "C:\\Program Files\\nodejs\\node.exe",