如何让node-inspector与foreman和nodemon一起运行?

我在我的.env文件中有我的heroku config vars,所以我必须使用工头在本地运行我的应用程序。 我需要使用节点检查器进行debugging,我不想手动重新启动我的应用程序,所以我也想使用nodemon

我如何一起使用nodemon,node-inspector和foreman?

真的很简单,只需要一个命令就可以把它们连在一起。

 # start node-inspector in the background $ node-inspector & # make nodemon execute foreman with debugging options enabled for app.js with ## either $ nodemon --exec "foreman run node --debug-brk app.js" ## or $ nodemon --exec "foreman run node --debug app.js" 

你完成了!