Closed Bug 1716314 Opened 6 months ago Closed 6 months ago

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

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(Fission Milestone:M8, firefox91 fixed)

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

People

(Reporter: Honza, Assigned: ochameau)

References

(Regressed 1 open bug)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(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
  • devtools.target-switching.server.enabled (when retesting later, it feels that this pref has no impact)

STRs:

  1. Load http://janodvarko.cz/tests/fission/case11/index.html
  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.

ER:
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 http://softwareishard.com/tests/fission/case1/index.html
  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

Honza

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 devtools.target-switching.server.enabled 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.

Status: NEW → ASSIGNED
Fission Milestone: --- → M8
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6827a0e26d0
[devtools] Better highlight BrowserToolbox test in debugger folder. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/7b08c04ad4db
[devtools] Implement Toolbox.isHighlighted. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/27b0d76318c5
[devtools] Use waitForLoadedScopes in browser toolbox tests. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/250d739d4ff2
[devtools] Test debugger highlight when pausing from another panel. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/687af8b0bc00
[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.