It appears that VS Code will support npm scripts and other launch scenarios in the release from October 2016.
Below is an example as it was proposed on GitHub.
packages.json
"scripts": {
"debug": "node --nolazy --debug-brk=5858 myProgram.js"
},
vscode launch config
{
"name": "Launch via NPM",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script", "debug"
],
"port": 5858
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…