Watchpoint UI follow up items
Categories
(DevTools :: Debugger, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: jlast, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
108.03 KB,
image/png
|
Details |
Lists a bunch of UI/UX polish items
UI Polish:
- Add a new "Break on..." submenu inspired by dom bps
- The watchpoint icon could be aligned better (maybe 1px lower would be enough):
- Hover style on the watchpoint icon is almost invisible in dark mode:
- There's no way to tell if a watchpoint is a get or a set (or both)
- When a watchpoint is set on a node, right click doesn't do anything. I think we should show a context menu to be able to add a set/get watchpoint, and new items to remove get / set watchpoint on the variable.
Edge Cases:
- Adding a watchpoint to a primitive doesn't work (size of a Set).
- Right clicking on a Set <entries> item throws in the browser console:
- Adding a watchpoint to an array item collapse the array in the scopes panel and turn the item into a getter that resolves to "Restricted"
- I see the possibility of a leak here as we currently have no way to remove a watchpoint after the scopes panel is emptied (when resuming).
- Adding a watchpoint to an object that is in a bucket or a
<default properties>
fails - Hovering on an object, does not format the property
Architecture:
- consider removing redux duplication between loadedProperties and watchpoints
New Features:
- When you resume, there's no way to see your watchpoints. I don't know if it is possible to show them and automatically remove them...
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Brian, do you know what we should do for adding a watchpoint to a primitive like size
in a Set?
Comment 2•5 years ago
|
||
(In reply to Jason Laster [:jlast] from comment #1)
Brian, do you know what we should do for adding a watchpoint to a primitive like
size
in a Set?
It seems like it would be best if certain properties can't have watchpoints set on them, if we know that they won't behave as expected. That includes Set.size, Array.length, properties of proxies, etc. For Set.size you could get most of the way there by modifying the prototype's add(), clear(), etc. methods to include a trap, but that wouldn't work if the page had already copied those methods somewhere else before the point at which the watchpoint was added. Another option would be a C++ trap for reading/writing the internal set size, but it's a non-trivial change to add such a thing and would get a lot more complicated with Array.length in particular.
Reporter | ||
Comment 3•5 years ago
|
||
Reporter | ||
Comment 4•5 years ago
|
||
^ pausing can throw errors
it is also possible to get a blank screen
Comment 5•5 years ago
|
||
Further possible followups:
- How to see list of all existing watchpoints? And perhaps switch them between set/get?
- How to remove/disable all watchpoints?
- Can we break on HTML Nodes props? This could be real powerful feature for the web-compat team.
Honza
The pause reason for set watchpoints is not correct. Easy bug to fix.
I think we should disable watchpoints if we disable breakpoints. This isn't exactly a UI bug but I will put it here for now:
Reporter | ||
Comment 8•5 years ago
|
||
closing as everything has been converted to bugs
Reporter | ||
Updated•5 years ago
|
Description
•