Chrome控制台不适用于节点检查器浏览器UI中的variables。 如何启用?
重现步骤。
-
文件名是
index.js
及其内容:'use strict'; debugger; let a = 10; // doesn't mean anything in regards to the issue.
-
针对该文件运行
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
线上停止执行。 在“Watch Expression
部分中设置监视variablesprocess
。 在这里可以很容易地检查它。 但只有在这里,Watch Expression
部分。
- 现在尝试在控制台中检查
process
variables。 它不起作用。 您可以键入一个variables,但按[Enter]
键不会显示process
variables。 它只是增加了新的一行:
这是什么行为? 如何使其工作?
我的问题在这里解决: Chrome检查器控制台不适用于版本54.0.2840.99
另外,从GitHub关于这个问题的线程: https : //github.com/node-inspector/node-inspector/issues/951#issuecomment-262441472