(节点:11684)[DEP0062] 弃用警告:不推荐使用`node --inspect --debug-brk`.请改用`node --inspect-brk` [英] (node:11684) [DEP0062] DeprecationWarning: `node --inspect --debug-brk` is deprecated. Please use `node --inspect-brk` instead
本文介绍了(节点:11684)[DEP0062] 弃用警告:不推荐使用`node --inspect --debug-brk`.请改用`node --inspect-brk`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
自从我升级 NodeJs 以来,我在从 Visual Studio 2017 运行 Nodejs 时遇到此错误.
I am getting this error running Nodejs from Visual Studio 2017 since i upgrade NodeJs.
断点也不起作用.有任何解决这个问题的方法吗?
Also breakpoints are not working. Any way to fix this?
注意:VS 版本是 15.5.6NodeJS 8.9.4 版
Note: VS version is 15.5.6 NodeJS version 8.9.4
推荐答案
我遇到了同样的问题,以下对我有用.
I was having the same issue, and following has worked for me.
第一个解决方案
更改您的launch.json 来自
change in your launch.json from
< "protocol": "legacy",
> "protocol": "auto",
这应该有效.
第二种解决方案
在 package.json 中:
In package.json:
scripts: {
"debug": "DEBUG=pd* nodemon --inspect-brk --harmony --nolazy server.js"
}
然后是来自最新 VS Code 的节点的默认调试启动配置:
Then default debug launch configuration for node from latest VS Code:
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229
}
两者都对我有用.
这篇关于(节点:11684)[DEP0062] 弃用警告:不推荐使用`node --inspect --debug-brk`.请改用`node --inspect-brk`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文