I was previously using gulp and running gulp to start my application and listeners from the Visual Studio Code debugger but have recently needed to switch to running scripts through npm instead. Unfortunately in VSCode I've not been able to run npm scripts through the debugger so I've had to resort to running node to start my server directly which gets rid of my listener tasks which reloaded code automatically.
This seems like something that should be simple but so far I haven't had much luck. Below is a snippet from my launch.json file that I attempted to use but npm could not be located.
{
...
"program": "npm",
"args": [
"run",
"debug"
],
...
}
This gives me the following error.
Error request 'launch': program 'c:myproject pm' does not exist
Related resources:
See Question&Answers more detail:os