inspect-brk
v0.1.2
Published
A small helper to make debugging Node more convenient.
Downloads
605
Maintainers
Readme
inspect-brk
🔎
A small helper to make debugging Node more convenient.
Install
$ yarn add -D inspect-brk
or
$ npm install --save-dev inspect-brk
Usage
Say you have a project like this one and you want to debug $ yarn build
:
{
"name": "cool-example",
"version": "0.1.0",
"scripts": {
"build": "webpack --config webpack.build.js"
},
"devDependencies": {
"webpack": "^3.10.0"
}
}
You would just write this and run $ yarn debug:build
:
{
"name": "cool-example",
"version": "0.1.0",
"scripts": {
"build": "webpack --config webpack.build.js",
"debug:build": "inspect-brk build webpack"
},
"devDependencies": {
"inspect-brk": "^0.1.0",
"webpack": "^3.10.0"
}
}
This basically turns "webpack --config webpack.build.js"
into "node --inspect-brk path/to/node_modules/.bin/webpack --config webpack.build.js"
. You don't need to worry about the concrete path and the params you use. 💕
You can also have a look into this example.