Nodemon inspect/debug 不工作?
Nodemon inspect/debug not working?
运行 nodemon --inspect index.js
或 nodemon --debug index.js
不起作用。
节点版本:8.9.1
Nodemon 版本:1.12.6
我试过这些都没有成功:
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
但是 node --inspect index.js
或 node --inspect-brk index.js
有效。我不知道如何?如果有任何替代方案或某种解决方法也很好。
Please comment if you need further description.
已解决、
似乎 nodemon@1.12.6
没有传递这个参数。有可用的更新版本 1.12.7
,一切正常。
nodemon --inspect app.js
.js 部分是绝对必要的。
根据官方文档Nodemon NPM
您也可以像往常一样通过命令行将检查标志传递给节点:
nodemon --inspect ./server.js 80
对于来自搜索引擎的人,可能存在与 nodemon 和 ts-node 相关的错误。
Error: Unknown or unexpected option: --inspect
这可能是一种使用 nodemon 进行检查的方法:
nodemon --exec 'node --inspect=0.0.0.0:9229 --require ts-node/register src/index.ts'
有关详细信息,请参阅 here
终于解决了
只需按照以下步骤操作即可:
确保您已经更新了 nodemon 的版本。更新正在使用以下命令:npm i nodemon@2.0.4 -g
。确保使用 -g
(以管理员身份向 运行 授予 nodemon 权限)。如果您收到一些警告,请尝试 运行 使用 sudo 命令 sudo npm i nodemon@2.0.4 -g
然后执行命令为:nodemon --inspect app.js
希望对您有所帮助..!!
运行 nodemon --inspect index.js
或 nodemon --debug index.js
不起作用。
节点版本:8.9.1
Nodemon 版本:1.12.6
我试过这些都没有成功:
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
但是 node --inspect index.js
或 node --inspect-brk index.js
有效。我不知道如何?如果有任何替代方案或某种解决方法也很好。
Please comment if you need further description.
已解决、
似乎 nodemon@1.12.6
没有传递这个参数。有可用的更新版本 1.12.7
,一切正常。
nodemon --inspect app.js
.js 部分是绝对必要的。
根据官方文档Nodemon NPM
您也可以像往常一样通过命令行将检查标志传递给节点:
nodemon --inspect ./server.js 80
对于来自搜索引擎的人,可能存在与 nodemon 和 ts-node 相关的错误。
Error: Unknown or unexpected option: --inspect
这可能是一种使用 nodemon 进行检查的方法:
nodemon --exec 'node --inspect=0.0.0.0:9229 --require ts-node/register src/index.ts'
有关详细信息,请参阅 here
终于解决了
只需按照以下步骤操作即可:
确保您已经更新了 nodemon 的版本。更新正在使用以下命令:
npm i nodemon@2.0.4 -g
。确保使用-g
(以管理员身份向 运行 授予 nodemon 权限)。如果您收到一些警告,请尝试 运行 使用 sudo 命令sudo npm i nodemon@2.0.4 -g
然后执行命令为:
nodemon --inspect app.js
希望对您有所帮助..!!