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:xxxxxxxxxx
1{
2"version": "0.2.0",
3"configurations": [
4{
5"name": "My Backend",
6"command": "npm run develop",
7"request": "launch",
8"type": "node-terminal"
9}
10]
11}
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).
