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):
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 } It turns out the debug on WebStorm doesn't work with babel-node because babel-node does NOT output the transformed code. The issue tracker is here