Open GoogleCodeExporter opened 8 years ago
Could you please check the following guess for me:
"remoteAddress" is a defined in prototype object. It's not a regular (data)
property, but an accessor property, which means that only a getter function is
actually stored in prototype, that is being called and gets the actual data
from your instance.
Original comment by peter.ry...@gmail.com
on 22 Jan 2013 at 4:38
Wouldn't prototyped properties be visible when traversing down (constructorand)
__proto__ attributes? Including functions? Because remoteAddress, wether
it's a getter function or a value is nowhere to be found within these.
Any other way to verify this?
Original comment by redsandro
on 22 Jan 2013 at 5:04
Yes, it should be in prototype chain. Thanks for checking this. I will try to
reproduce it.
Original comment by peter.ry...@gmail.com
on 22 Jan 2013 at 6:58
Reproduced on Node.JS v. 0.6.2:
"remoteAddress" is listed in prototype object. However it has an incorrect
value 'undefined'.
Original comment by peter.ry...@gmail.com
on 22 Jan 2013 at 7:11
Accessor property is handled incorrectly by debugger, if property is defined in
prototype object.
Probably, getter function is incorrectly called on prototype object rather than
on original object.
Original comment by peter.ry...@gmail.com
on 22 Jan 2013 at 7:13
Thanks for looking into this so quickly.
In my instance, I cannot find remoteAddress in the __proto__ chain, not even
with value false.
It also doesn't show up when searching (Ctrl+F) the Variable window during
break(point).
Original comment by redsandro
on 22 Jan 2013 at 9:47
If it doesn't show up in search but you did find it manually, can you tell me
the object path so I can verify?
Original comment by redsandro
on 22 Jan 2013 at 9:49
I don't think that Ctrl+F works correctly for JavaScript variables. It knows
nothing about proto chain and Eclipse API doesn't allow providing any logic
there.
The path is simple: connection.__proto__ (1 step in prototype chain)
Original comment by peter.ry...@gmail.com
on 22 Jan 2013 at 10:01
I will verify it when I am back at the office, but just fyi, if you Ctrl+F
inside the Variable window and search for a variable for which you know it
is inside a __proto__, it will find it.
I think if the debug variable explorer can show it, then Ctrl+F can find it.
Original comment by redsandro
on 23 Jan 2013 at 1:35
Just double-checked, it's like I thought. On my machine is no remoteAddress.
But when you request it in the expression editor, it does have a value of
127.0.0.1.
Original comment by redsandro
on 24 Jan 2013 at 8:18
Attachment
Original comment by redsandro
on 24 Jan 2013 at 8:21
Attachments:
Looks like you didn't open "connection" as you described initialy
Original comment by peter.ry...@gmail.com
on 24 Jan 2013 at 8:47
Oops.. long day, forgive me.
Let me try again tomorrow. :)
Original comment by redsandro
on 24 Jan 2013 at 9:02
Original issue reported on code.google.com by
redsandro
on 22 Jan 2013 at 3:05