Closed
Description
- Version: 7.4
- Platform: Sierra OSx
Currently, only this works
node --inspect myscript.js
It seems dumb that the following shouldn't work
node myscript.js --inspect
This becomes especially important when doing complex npm run scripts with passed arguments. For instance, if this feature existed, then we could define a regular run-script and a debug run-script in our package.json, like so
"scripts": {
"regular": "node myscript.js",
"debug": "npm run regular -- --inspect"
}
But this fails for the reasons described above.
Also, it just makes sense that order shouldn't matter with command line flags.