Works for generally running node script and inside express etc callbacks.
Need to make sure that port
in launch.json and --inspect-brk=X
in package.json match.
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch via NPM", | |
"runtimeExecutable": "npm", | |
"runtimeArgs": [ | |
"run-script", | |
"debug", | |
], | |
"port": 9229 | |
}, | |
] | |
} |
{ | |
"name": "debug", | |
"version": "1.0.0", | |
"main": "index.js", | |
"scripts": { | |
"debug": "node --inspect-brk=9229 index.js" | |
}, | |
} |