Conditional watchpoints for property accesses




9 years ago
5 years ago


(Reporter: johnjbarton, Unassigned)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [firebug-p3])



9 years ago
jjb on

> (Salman Mirghasemi) suggested a debug call back for property names rather >like but not set on a particular object. That way if I really >want, I can ask for all 'bar', filter for 'foo' in the debugger and >hope it's not too many. 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, maybe also deleted I'd have to look into it.


9 years ago
Whiteboard: [firebug-p3]

Comment 1

9 years ago
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.
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.