Chrome console doesn't work for variables in node-inspector browser UI. How to enable?

谁说我不能喝 提交于 2019-12-24 01:23:38

问题


Steps to reproduce.

  1. Filename is index.js and its contents:

    'use strict';
    
    debugger;
    let a = 10; // doesn't mean anything in regards to the issue.
    
  2. Run node-debug against the file.

    $ 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
    
  3. 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.

  1. Now try to examine process variable in console. It doesn't work. You can type a variable, but hitting [Enter] key doesn't reveal process variable. It just adds new lines:

What behavior is this? How to make it work?


回答1:


My issue is solved here: Chrome inspector console does not work with version 54.0.2840.99

Also, a thread from GitHub about the issue: https://github.com/node-inspector/node-inspector/issues/951#issuecomment-262441472



来源:https://stackoverflow.com/questions/41083622/chrome-console-doesnt-work-for-variables-in-node-inspector-browser-ui-how-to-e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!