节点检查器显示对象的“无属性” [英] node-inspector shows 'No Properties' for objects
问题描述
我在调试场景中非常新鲜,特别是使用节点检查器。
I'm pretty new in the debugging scene, especially with node-inspecor.
安装节点检查器后,我开始使用简单的节点应用程序--debug参数,并且能够看到本地主机上的调试视图:8080 / debug?port = 5858。
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.
当我让该应用在这个断点停止时: p>
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:传入邮件 - 无属性
- res:服务器响应 - 无属性
- str:rarf
- num:1
- obj:对象 - 无属性
- 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?
推荐答案
我也有同样的问题。我的节点版本是0.10.35(stable)。但是当我使用节点版本 0.11.13(unstable)
或更高版本时,这个问题就消失了。因此,您将尝试将节点版本更新为 0.11.13
,使用工具 n
强>。使用 npm install -g n
命令来安装 n
。
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
.
这篇关于节点检查器显示对象的“无属性”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!