EN
VS Code - debug with npm run
7
points
In this short article, we would like to show you how in VS Code debug Node.js application that starts with npm run
command.
Simple steps
- configure
.vscode/launch.json
file:{ "version": "0.2.0", "configurations": [ { "name": "My Backend", "command": "npm run develop", "request": "launch", "type": "node-terminal" } ] }
Hints:
- change
"command"
value to the command you want to debug, - commands are available in
package.json
file in"scripts"
part.
- change
- go to Run and Debug view (or press
Ctrl
+Shift
+d
keys), - select
My Backend
configuration, - click Start Debugging button (or press
F5
key).