I have a NodeJs project and I run it using nodemon,
I wish to run it in debug mode for development tasks, but I am unable to do so.
I found that I\'ll need to ad
In vscode config, you can set the runtimeExecutable
which will run the program you give. set restart:true
so vs code debugger can restart the process.
This is an example config:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "nodemon",
"runtimeExecutable": "nodemon",
"program": "${workspaceFolder}/bin/www",
"restart": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"debug": "app:*",
}
}
]
}
Update program
to the node file you want to debug.
It's easy than attaching a debugger to the running node process.