I have npm run
script in package.json:
"scripts": {
"start": "nodemon lib/app.js --exec babel-node --presets es2015,stage-2"
}
How do you start a debugging session on WebStorm with this script?
Right-click on package.json in the Project view and select "Show npm Scripts":
This will display the npm Tool Window with a list of your scripts. Right-click on a script and select Debug 'start' (for example):
NPM Tool Window
For the debugger to work (so that it stops at breakpoints, etc.) you need to add the string $NODE_DEBUG_OPTION to the script definition, for example:
"scripts": {
blah: node $NODE_DEBUG_OPTION blah.js
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With