Nodemon inspect/debug not working?

2020-03-12 02:59发布

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.

3条回答
在下西门庆
2楼-- · 2020-03-12 03:36
nodemon --inspect app.js

The .js part is absolutely necessary.

查看更多
贼婆χ
3楼-- · 2020-03-12 03:37

As per official doc Nodemon NPM

You can also pass the inspect flag to node through the command line as you would normally:

nodemon --inspect ./server.js 80

查看更多
【Aperson】
4楼-- · 2020-03-12 03:51

SOLVED,

It seems like nodemon@1.12.6 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

查看更多
登录 后发表回答