Chrome控制台不适用于节点检查器浏览器用户界面中的变量.如何启用? [英] Chrome console doesn't work for variables in node-inspector browser UI. How to enable?
问题描述
复制步骤.
-
文件名是
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
部分中设置监视变量process
.在这里可以很容易地检查它.但是只有在这里,在Watch Expression
部分.
It opens UI in Chrome and the execution is stopped on debugger
line.
Set a watch variable process
in a Watch Expression
section. It is possible to examine it easily here. But only here, in Watch Expression
section.
- 现在尝试在控制台中检查
process
变量.它不起作用.您可以键入一个变量,但是按[Enter]
键不会显示process
变量.它只是添加了新行:
- Now try to examine
process
variable in console. It doesn't work. You can type a variable, but hitting[Enter]
key doesn't revealprocess
variable. It just adds new lines:
这是什么行为?如何使其工作?
What behavior is this? How to make it work?
推荐答案
我的问题已在此处解决: Chrome浏览器控制台不适用于该版本54.0.2840.99
My issue is solved here: Chrome inspector console does not work with version 54.0.2840.99
另外,一个来自GitHub的关于这个问题的线程: https://github.com/node-inspector/node- inspector/issues/951#issuecomment-262441472
Also, a thread from GitHub about the issue: https://github.com/node-inspector/node-inspector/issues/951#issuecomment-262441472
这篇关于Chrome控制台不适用于节点检查器浏览器用户界面中的变量.如何启用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!