Ale*_*lov 24 google-chrome node.js google-chrome-devtools
我刚刚将Chrome升级到73.0.3683.75(Linux),现在无法使用专用的Node调试器来实际调试正在运行的实例。即使我可以在控制台中看到“附加了调试器”消息:
$ node --inspect-brk hello.js
Debugger listening on ws://127.0.0.1:9229/864a1c18-5e45-49ab-843c-77a22841ffff
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
有人知道Chrome 73是否损坏了它,或者我做错了什么?谢谢!
Car*_*low 18
是的,这是v73的错误。我也看到了
https://bugs.chromium.org/p/chromium/issues/detail?id=941608&q=nodeJS
更新
此错误已在 chrome 74.0.3729.61 中修复,请查看此处
您可以使用专为 Node.js 定制的ndb ,它也来自 GoogleChromeLabs。
安装使用
npm install -g ndb
用法:
使用ndb代替节点命令:
    ndb server.js
    # Alternatively, you can prepend `ndb`
    ndb node server.js
在任何其他二进制文件前面添加 ndb:
    ndb npm run unit
    ndb mocha
    ndb npx mocha
将 ndb 作为独立应用程序启动:
    # cd to your project folder (with a package.json)
    ndb .
    # In Sources panel > "NPM Scripts" sidebar, click the selected "Run" button
如果您使用的是nodemon:
 ndb nodemon .
有关更多详细信息,请参阅项目 github 存储库
https://github.com/GoogleChromeLabs/ndb
| 归档时间: | 
 | 
| 查看次数: | 1110 次 | 
| 最近记录: |