DOM Mutation Breakpoints: Disabling Mutation Breakpoint in the Debugger doesn't show checked context menu in inspector
Categories
(DevTools :: Debugger, defect, P2)
Tracking
(firefox108 fixed)
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: davidwalsh, Assigned: luke.swiderski)
References
(Blocks 1 open bug)
Details
(Whiteboard: good-second-bug)
Attachments
(1 file)
STR:
- Create a DMB in the inspector via the context menu
- Go to the debugger, disable the DMB
- Go back to the inspector, right-click the node, go to "Break on..."
ER: The context menu item is still checked
AR: No context menu item is checked
Setting the same DMB type again enables the DMB.
Ideally the item would still be checked.
Reporter | ||
Comment 1•5 years ago
|
||
Adding this functionality would also allow us to show disabled state in the inspector.
Updated•5 years ago
|
Comment 2•4 years ago
|
||
I can still reproduce the problem marking as good second bug.
Honza
Assignee | ||
Comment 3•3 years ago
|
||
I’ve been investigating this bug. The function _getDOMBreakpointSubmenu(), line 506 in the file markup-context-menu.js uses “this.selection.nodeFront.mutationBreakpoints” to see if subtree, attribute, and removal are true or false. To fix this bug, it seems that it should also know if the breakpoints are enabled or not. I am stuck trying to figure out how to select the ‘enabled’ status properly from this file. I’ve been doing experiments and I can see that the “enabled” status is accessible. Writing statements in the console like “this.toolbox.store.getState();” returns an array of all the breakpoints, in which I see can the enabled status of each. Is there a simple way to select the enabled status for just the ‘node’ selected, similar to “this.selection.nodeFront.mutationBreakpoints?”
Comment 4•3 years ago
|
||
Luke, thank you for the analysis! You are going in the right direction.
Note that you can use BrowserToolbox to debug the DevTools UI Itelf
https://firefox-source-docs.mozilla.org/devtools-user/browser_toolbox/index.html
I think that you are looking for this function
https://searchfox.org/mozilla-central/rev/70cf6863bd85af2a3188ec1fe5209a3ec1b2de86/devtools/server/actors/inspector/walker.js#1952
(you can use the Browser Toolbox and set a breakpoint there)
Bomsy, where the this.selection.nodeFront.mutationBreakpoints
is populated? Is it built by getMutationBreakpoint
?
Here is the code where the object is used to build the context menu for the MarkupView (the Inspector panel)
https://searchfox.org/mozilla-central/rev/70cf6863bd85af2a3188ec1fe5209a3ec1b2de86/devtools/client/inspector/markup/markup-context-menu.js#508
Assignee | ||
Comment 5•2 years ago
|
||
Add functionality to let inspector markup-context-menu remained checked when a
dom mutation breakpoint is disabled in the debugger.
Add disabled icon in inspector when a dom mutation breakpoint is disabled.
Add mochitests.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 7•2 years ago
|
||
bugherder |
Updated•8 months ago
|
Description
•