重现步骤。
-
文件名是index.js
及其内容:
'use strict';
debugger;
let a = 10; // doesn't mean anything in regards to the issue.
-
Run node-debug
反对该文件。
$ node-debug index.js
Node Inspector v0.12.8
Visit http://127.0.0.1:8080/?port=5858 to start debugging.
Debugging `index.js`
Debugger listening on [::]:5858
它在 Chrome 中打开 UI 并停止执行debugger
线。
设置监视变量process
in a Watch Expression
部分。可以在这里轻松检查它。但只有在这里,在Watch Expression
部分。
- 现在尝试检查
process
控制台中的变量。这不起作用。您可以输入一个变量,但点击[Enter]
钥匙不显示process
多变的。它只是添加了新行:
这是什么行为?如何让它发挥作用?
我的问题在这里解决了:Chrome 检查器控制台不适用于版本 54.0.2840.99 https://stackoverflow.com/questions/40562563/chrome-inspector-console-does-not-work-with-version-54-0-2840-99
另外,GitHub 上有一个关于这个问题的帖子:https://github.com/node-inspector/node-inspector/issues/951#issuecomment-262441472 https://github.com/node-inspector/node-inspector/issues/951#issuecomment-262441472
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)