— by Abhisek Pattnaik <[email protected]>
Last active
October 7, 2017 05:40
-
-
Save abhisekp/0873d38ee69fe2a6bf78d77bf7b69083 to your computer and use it in GitHub Desktop.
Debug Node Apps
In package.json
file, add the following script
"scripts": {
"start": "node .",
"build": "babel -D -d build/ src/",
+ "debug": "babel-node --inspect --inspect-brk src/"
},
$ npm run debug
# yarn run debug
{
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch via NPM",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"debug"
],
"port": 9229
}
]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment