[meta] Add Watchpoints in the devtools
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: dangoor, Unassigned)
References
(Depends on 16 open bugs, Blocks 2 open bugs)
Details
(Keywords: meta)
Attachments
(1 file)
20.14 KB,
patch
|
Details | Diff | Splinter Review |
Comment 1•13 years ago
|
||
Reporter | ||
Comment 2•13 years ago
|
||
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Comment 7•11 years ago
|
||
Updated•11 years ago
|
Updated•11 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Updated•6 years ago
|
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #8)
We have it now:
https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Set_Watch_Expressions
Hi Sylvestre!
I just came here looking for the same thing as this bug describes.
"It would be nice if the debugger could break when a variable's value changed"
Watch-Expressions only allow the user to see the value of variables when a break naturally occurs.
Is this not different?
Comment 10•6 years ago
|
||
Hi Alec, good point. I'll re-open this bug. We have watch points on the roadmap. It would be a really nice feature.
Comment 12•5 years ago
|
||
Here are some initial mockups design.
Miriam and I sketched out a server Object.defineProperty approach today.
Brian, what would we need to do in spider monkey to make this real?
Notes:
- it would be nice to auto-bind watch points to support immutable objects
- it would be nice to support property delete
- it would be nice to integrate into the console
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Minimizing the impact on spidermonkey internals seems like a good approach. Redefining properties to have new getters and setters is nice and minimal impact, but it won't handle delete, reconfigurations (we don't want site code to be able to remove special getters/setters) or accessing the property definition (we don't want site code to be able to see the getters/setters either). These should all have pinchpoints in the VM and we could have a debugger trap there that can observe changes to properties, allowing the debugger to pause, to modify the property being defined or the property info being read back out. I think this would take care of everything except proxies, which seem best to just leave alone for now.
Comment 14•5 years ago
|
||
WIP from last month, which works in simple cases but doesn't modify spidermonkey, allowing site code to tell that new setters have been installed on their properties, redefine those setters, etc. I'm not actively working on this, just attaching this for posterity.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•2 years ago
|
Description
•