node-inspector shows 'No Properties' for objects

允我心安 提交于 2019-12-09 20:23:17

问题


I'm pretty new in the debugging scene, especially with node-inspecor.

After I had installed node-inspector, I started my simple node app with the --debug parameter and was able to see the debug view at localhost:8080/debug?port=5858.

When I let the app stop at this breakpoint:

router.get('/people', function(req, res) {
    var num = 1;
    var str = 'rarf';
    var obj = {x: 1, y: 2}

    console.log(req)    // breakpoint
});

and hover with the curser on the identifier, it shows as follows:

  • req: Incoming Message - No Properties
  • res: Server Response - No Properties
  • str: "rarf"
  • num: 1
  • obj: Object - No Properties

Why can't I see the properties of objects?


回答1:


I had the same problem. my node version is 0.10.35(stable). But when I use the node version 0.11.13(unstable) or later, this problem is gone. So, you would try to update your node version to 0.11.13 that use the tools n. Use the npm install -g n command to install the n.



来源:https://stackoverflow.com/questions/27830963/node-inspector-shows-no-properties-for-objects

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