无法使用Chrome DevTools调试node --inspect

3

我正在尝试在Mac M1 Pro上使用node --inspect-brk和Chrome DevTools调试一个Node应用程序。运行脚本后,输出如下:

Debugger listening on ws://127.0.0.1:9229/f43fcdcb-b0ff-4a2f-8bd4-e60a7ecd817e
For help, see: https://nodejs.org/en/docs/inspector

当我输入 chrome://inspect 时,我没有看到任何可检查的数据。

enter image description here

1个回答

4
在“发现网络目标”中将localhost:9229配置为127.0.0.1:9229后,问题得到解决。现在它在127.0.0.1下列出。
请参考以下图片:
enter image description here
enter image description here

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接