Is there a way for me to run npm start
and pass in the --inspect flag?
npm --inspect start
doesn't work.
Neither does npm start -- --inspect
npm supports a node-options
config value which is passed through using the NODE_OPTIONS
environment variable. This environment variable is interpreted by NodeJS 8+. So if your package.json looks something like:
{
...
"scripts": {
"dev": "node src/index.js"
},
...
}
then you can use
npm --node-options --inspect run dev
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