admin管理员组文章数量:1310780
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).
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).
Share Improve this question edited Jul 18, 2013 at 4:27 ericsoco asked Jul 16, 2013 at 18:53 ericsocoericsoco 26.3k31 gold badges101 silver badges129 bronze badges 1- Per @beefeather's answer, I filed a Chromium feature request: code.google./p/chromium/issues/detail?id=263116 – ericsoco Commented Jul 22, 2013 at 20:44
3 Answers
Reset to default 2Technically this is possible. You probably already can see it, if you use Chrome Dev Tools for Java (Eclipse-based debugger). http://code.google./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.
P.S. Note, that this not an address at all – both Java and JavaScript move their objects in memory at random moments.
JavaScript does not have memory addresses. "The same variable" can be pared using the triple equal sign notation (anObjectReference === anotherObjectReference
)
I believe this is possible using Chrome Dev Tools by:
- Taking a Heap Snapshot and opening up console while in summary view
- Printing the object in the console
- Right clicking the console output and selecting "Reveal in Summary View" (If you don't see this option it is likely that you do not have the profile panel open)
本文标签: javascriptPossible to tell if two objects are the same in Chrome debuggerStack Overflow
版权声明:本文标题:javascript - Possible to tell if two objects are the same in Chrome debugger? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741865150a2401855.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论