I’m using Visual Studio Code to run ExpressJs in debug mode.
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}\nodemon server.js"
}
]
}
I’m getting the following error when I start debugging.
If I run nodemon server.js
in the terminal it works. The above error only appears when using Visual Studio Code debugging. I have tried the the following:
- Remove node_modules and reinstall node_modules
- Reinstall nodemon globally
2
Answers
I ended up using Visual Studio Code "JavaScript Debug Terminal". In the terminal I run command
nodemon server.js
and it works.You need to update this code line
to