I have edited my package.json to customize the \"start\" script so it adds the --debug flag to node:
\"scripts\": { \"start\": \"node --debug server.js
In your package.json define the script
"scripts": { "debug": "node --inspect server.js" }
And then you can use npm's run-script
npm run-script debug
or the shorter version
npm run debug