gpt4 book ai didi

node.js - 无法使用 Node 检查器 : websocket_closed and Assertion failed: Unknown experiment canvasInspection 调试 Nodejs

转载 作者:IT老高 更新时间:2023-10-28 23:11:19 26 4
gpt4 key购买 nike

我尝试在 windows 环境下使用 node-inspector (v0.12.8)、nodejs (v5.9.1) 和 chrome (v49.0.2623.112 m) 调试我的 server.js 应用程序。
在shell中我做

node-inspector   
Node Inspector v0.12.8 Visit http://127.0.0.1:8080/?port=5858 to start debugging.

在第二个 shell 中我会这样做

node --debug server.js

当我转到 chrome 标签时,我收到一条消息:

Detached from target
remote debug has been terminated with reason: websocket_closed
please reattach to the new target

在 chrome 的控制台开发工具中,我可以看到检查员找不到实验功能 canvasInspection 的消息(在最新的 chrome 版本中删除)。
我做错了什么?

最佳答案

不是具体的答案,但是从 Node v6 开始,您实际上可以在启动进程时只使用 --inspect 标志,它会让您使用 Chrome 调试工具而不是依赖在 Node 检查器上。看看吧:

https://nodejs.org/docs/latest/api/debugger.html#debugger_v8_inspector_integration_for_node_js

希望这会有所帮助!

关于node.js - 无法使用 Node 检查器 : websocket_closed and Assertion failed: Unknown experiment canvasInspection 调试 Nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36565449/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com