Running nodemon --inspect index.js
or nodemon --debug index.js
doesn't work.
Node Version : 8.9.1
Nodemon Version : 1.12.6
I have tried these with no luck :
nodemon --inspect-brk index.js
nodemon -- --inspect index.js
nodemon index.js -- --inspect index.js
nodemon index.js -- --debug index.js
nodemon -- --debug index.js
nodemon --inspect --debug index.js
nodemon --debug-brk index.js
But node --inspect index.js
or node --inspect-brk index.js
works. I wonder how? If any alternatives or some kinda workaround would be great too.
Please comment if you need further description.
nodemon supports local and global configuration files. These are named nodemon. json and can be located in the current working directory or in your home directory. The specificity is as follows, so that a command line argument will always override the config file settings: command line arguments.
For people coming from search engines, there could be a bug related to nodemon and ts-node.
Error: Unknown or unexpected option: --inspect
This can be a way to use inspect with nodemon:
nodemon --exec 'node --inspect=0.0.0.0:9229 --require ts-node/register src/index.ts'
For more information see here
SOLVED,
It seems like [email protected]
was not passing in this argument. There is a newer version available 1.12.7
where everything works fine and well.
Answer source: Nodemon Issues - Github
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