Skip to content

Instantly share code, notes, and snippets.

@bcomnes
Last active March 11, 2018 18:44
Show Gist options
  • Save bcomnes/2421f38be737ce9e12c9e859a9b9e94e to your computer and use it in GitHub Desktop.
Save bcomnes/2421f38be737ce9e12c9e859a9b9e94e to your computer and use it in GitHub Desktop.
How to set up vs code debugger with a run script
{
// 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
// https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-support-for-npm-and-other-tools
"version": "0.2.0",
"configurations": [
{
"name": "Launch via test NPM",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script", "debug"
],
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/index.js"
}
]
}
{
"scripts": {
"test": "tape test/* | tap-format-spec",
"debug": "node --nolazy --inspect-brk=9229 node_modules/.bin/tape test/*"
},
"devDependencies": {
"@tap-format/spec": "^0.2.0",
"tape": "^4.6.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment