VSCode Launch Configuration for Node App
VSCode's debugging launch configurations are saved in ./vscode/launch.json
.
To add a launch configuration for a node app:
Run and Debug
in the left panel.create a launch.json file
.{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch via NPM",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script", "dev" // your npm script
],
}
]
}