问题
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