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

标签 node.js heroku node-inspector nodemon

我的 .env 文件中有 Heroku 配置变量,因此我必须使用 foreman 在本地运行我的应用程序。我需要使用node-inspector进行调试,并且我不想手动重新启动我的应用程序,所以我还想使用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"

你就完成了!

关于node.js - 如何让 node-inspector 与 foreman 和 nodemon 一起运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30396452/

相关文章:

java - 错误: Could not find or load main class

mysql - MySQL/Postgres 之间的大小写敏感问题

node.js - 在 intellij ultimate 2017.1 中调试 Node/Express 应用程序

node.js - 将 Node 检查器与多个 Node 进程一起使用

javascript - 为什么代码在 'return res.send();' 之后继续运行

node.js - 从 NodeJS 中的 DataOutputStream 读取

node.js - NodeJS 未使用的变量

node.js - 运行 foreman 启动 Node.js 应用程序时出错

node.js - 如何在 Windows 7 上使用 npm 安装 v8-profiler?

node.js - 无法使用 Mocha 和 Supertest 发出经过身份验证的请求