jjb on mozilla.dev.tech.js-engine: > (Salman Mirghasemi) suggested a debug call back for property names rather >like object.watch but not set on a particular object. That way if I really >want foo.bar, I can ask for all 'bar', filter for 'foo' in the debugger and >hope it's not too many. andreas.gal replies: This is definitely something we can do. Its similar to watchpoints in gdb. It would probably come at a substantial performance overhead when enabled (I am guessing 5-10x, same for gdb btw), but it would be free if not enabled. Want to file a bug on this? "Conditional watchpoints for property accesses". We have an intern who is working on debugging support for Jaegermonkey and this is relatively easy to wire up (we just trap all SETPROP/GETPROP operations). It would help if you describe in the bug the way you want to use this in the debugger so we can figure out what platform mechanisms we need at the jsd and engine level. --- The debugger would say something like: "For a global scope and any scope created by code it runs, call me synchronously if a property of any object is 1) created, 2) changed, 3) deleted, and tell me the stack frame, object, property and what happened." Created is critical, changed can be dealt with using object.watch, maybe also deleted I'd have to look into it.
our efforts to track object creation via JS are not working well. Can you give us any more hints on how to implement this? Esp. if you have suggestions using the 1.9.2 code base since trunk is not usable for debugging yet.
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.