Closed
Bug 835878
Opened 12 years ago
Closed 12 years ago
Add "Break on Modification" and "Break on Attribute Modification" to JavaScript Objects
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 740548
People
(Reporter: chris, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17
Steps to reproduce:
N/A
Actual results:
N/A
Expected results:
In dev tools: It would be extremely useful to be able to right click on an object logged into the console and be able to set break points based on object modification (any attribute) or on a single attribute modification.
For example, if I were working on an API that accepted an object as an argument and (at some point) modified that object, and I wanted to find out where and how it was being modified without much introspection, I could create that object in the web console, then right click on the output to set "Break on Modification", then pass that object into the API. After a moment, JS execution halts and falls into the step debugger at the line where the object is modified. If I hit "Continue", execution resumes until the next time the object is modified. To remove the breakpoint, I can either log the object (and it should appear with a tiny breakpoint symbol next to it) and right click / remove all breakpoints, or disable it in the list of all breakpoints in the debugger.
Theoretically this could be accomplished by swapping out the object for a Proxy, or by using Object.defineProperty(obj, prop) for specific attribute modification.
Updated•12 years ago
|
Component: Untriaged → Developer Tools: Debugger
Updated•12 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•