Reputation: 26253
In Eclipse, the debugger shows a unique session id next to each object (for Java and AS3, anyway). This makes it simple to identify the same object appearing in multiple contexts.
I'm working on a JavaScript project, and would like the same ability to identify objects in the Chrome debugger (e.g. in the "Scope Variables" pane). Is this information tracked by the browser/debugger? Is there a different way to identify an object across contexts, without adding code (a purely IDE way of doing this, applicable to any context).
Upvotes: 10
Views: 5318
Reputation: 21
I believe this is possible using Chrome Dev Tools by:
Upvotes: 1
Reputation: 1040
Technically this is possible. You probably already can see it, if you use Chrome Dev Tools for Java (Eclipse-based debugger). http://code.google.com/p/chromedevtools
As to in-browser debugger, UI merely lacks UI for this. I guess you should file a feature request on this at: http://crbug.com
P.S. Note, that this not an address at all – both Java and JavaScript move their objects in memory at random moments.
Upvotes: 2
Reputation: 7654
JavaScript does not have memory addresses. "The same variable" can be compared using the triple equal sign notation (anObjectReference === anotherObjectReference
)
Upvotes: 1