Closed Bug 1716314 Opened 6 months ago Closed 6 months ago

Debugger panel should be auto-selected when JS execution is paused


(DevTools :: Debugger, defect)



(Fission Milestone:M8, firefox91 fixed)

91 Branch
Fission Milestone M8
Tracking Status
firefox91 --- fixed


(Reporter: Honza, Assigned: ochameau)


(Regressed 1 open bug)


(Whiteboard: dt-fission-m3-mvp)


(6 files)

Debugger pauses at an exception but the panel isn't automatically selected and the panel tab icons isn't highlighted

I have these prefs on:

  • fission.autostart
  • (when retesting later, it feels that this pref has no impact)


  1. Load
  2. Open Debugger, check Pause on exceptions
  3. Select the Network panel
  4. Reload the page
  5. The Debugger is paused (as well as the page load), but the Debugger panel isn't auto selected.

The Debugger panel is selected and the panel's icon highlighted, i.e. green (so, the user sees that JS execution is paused).

STR for expected result

  1. Load
  2. Create BP in index.js
  3. Select the Network panel
  4. Click this same page link twice (to navigate to different domain and back)
  5. Debugger panel hits the BP and is selected


I do reproduce. I also reproduce the second STR.
Note that it seems to be related to the target into which we hit a breakpoint.
The second STR also fails if you set the BP in the remote target instead of the top document.

I also confirm that has no impact on these failures.
So we probably have some missing test coverage around BP in iframes, or at least toolbox highlight as the debugger seems to be functional other than the highlight.

Assignee: nobody → poirot.alex

Also tweak the unselected-pause test to start using Toolbox.isHighlighted
instead of using class internals on multiple layers.

So that test can use this helper instead of querying toolbox internals

This was really confusing.
This test wasn't using the expected "dbg" object. It has to be created
via createDebuggerContext.
Then, it was also confusing that waitForPaused was using an empty waitForLoadedScopes.
So that the browser toolbox test was doing much less assertions.
Last but not least, the test was selecting the debugger before triggering the debugger statement,
this completely defeat the purpose of this test!

Only the second task should be failing without this patch queue.

Also fix a nit in browser_dbg-breaking-from-console.js,
which was one of the rare test covering debugger auto-select.
I'm wondering if I should remove this old test in favor of the new one?
Or meld it into the new one, by covering debugger statements from the console?

Blocks: 1717005

Also ensure to close the browser toolbox when the test failed.
Otherwise, it fails with a timeout when trying to re-run the test
which will connect to the old defunct browser toolbox.

Fission Milestone: --- → M8
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Pushed by
[devtools] Better highlight BrowserToolbox test in debugger folder. r=nchevobbe
[devtools] Implement Toolbox.isHighlighted. r=nchevobbe
[devtools] Use waitForLoadedScopes in browser toolbox tests. r=nchevobbe
[devtools] Test debugger highlight when pausing from another panel. r=nchevobbe
[devtools] Fix debugger highlight when pausing in remote iframes. r=nchevobbe
Blocks: 1717807
Regressions: 1717705
No longer blocks: 1721161
You need to log in before you can comment on or make changes to this bug.