Focus tab toolbox in background tab when hitting breakpoint
Categories
(DevTools :: about:debugging, defect, P3)
Tracking
(firefox143 fixed)
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: jaborandi, Assigned: jdescottes)
References
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
Steps to reproduce:
- open debugger for an arbitrary extension using technical url:
about:devtools-toolbox?type=extension&id={EXTENSION_ID}
-
set a breakpoint
-
do something to trigger the breakpoint
-
close the debugger tab
-
open about:debugging page / This ... / Extensions and press Inspect button
-
do whatever should trigger the breakpoint again
Actual results:
3 - breakpoint doesn't work
6 - breakpoint works
Expected results:
breakpoint should work in both cases
| Assignee | ||
Comment 1•7 months ago
|
||
Can you share a specific extension and steps to trigger the breakpoint? I tried with a simple webextension https://addons.mozilla.org/en-US/firefox/addon/devtools-highlighter/ and I could break on breakpoints both with a tab opened at about:devtools-toolbox?type=extension&id={ff0cf743-dcf3-4097-ae4c-d872c18f7b4e} or with the default toolbox window.
| Reporter | ||
Comment 2•7 months ago
|
||
hello, Julian
i was wrong: the break points do work, it's just that firefox doesn't switch to the debugger automatically
i'm not sure how much of a problem it is - it was enough for me to be confused and think breakpoints don't work at all though...
a test extension together with test.html to trigger the breakpoint are here:
i set breakpoint on the only inside the event handler function: console.log('here');
when debugging in a separate window opened via Inspect button, when the breakpoint is triggered, FF automatically switches to the debugger window
when debugging in a tab with debugger opened via the url about:devtools-toolbox?type=extension&id=test@addon , it does not
| Reporter | ||
Comment 3•7 months ago
|
||
p.s. i only tested in versions 136 and 138
| Reporter | ||
Comment 4•7 months ago
|
||
i guess this is because historically debugger was always either in a standalone window - then focusing/bringing to top its window is enough, or in the same window and same tab - for web page's javascript - then no need to do anything at all
when debugger is in a separate tab of the same window is the only case when you need, in addition to ensure that the debugger window is on top - to also switch to its tab
and since this hasn't been used much, it was never implemented
| Assignee | ||
Comment 5•7 months ago
•
|
||
So to summarize, the issue is that if you have a devtools toolbox in a background tab, when the debugger pauses you expect the tab to be automatically focused/selected.
That's probably not a very common use case. We would expect users with a tab toolbox to have it in the foreground. In general it would still be nice to be able to nudge users about devtools' activity in a tab. I'm not sure we should force selecting the tab, but we could display information in the tab itself (eg a "paused" label or icon). We have Bug 1742761 about this.
Updating the title and moving to enhancement.
| Reporter | ||
Comment 6•7 months ago
|
||
to be honest it's probably the 100% use case
when you set a breakpoint - you DO want it to break and you don't always even know when/if it happens
and just today i've had a case when it was even more needed than normally - the break point was in function that is triggered on idle)))
but thinking about it again - i'd bet on you safely can and SHOULD always focus whatever the debugger is when a breakpoint happens in it
note, the use case with debugger being in a separate window is exactly the same and we DO switch to the debugger window on break point - without worries that it might be obtrusive))
so i really suggest you to change the title from COULD to SHOULD and change it from improvement to bug - it really is (not being critical or anything, it's just fact... it's much less usable like this)
| Assignee | ||
Comment 7•7 months ago
|
||
Alright, I guess that could also be useful if you have regular tab toolboxes not related to webextension debugging.
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Comment 8•7 months ago
|
||
Updated•7 months ago
|
Comment 10•7 months ago
|
||
| bugherder | ||
Updated•6 months ago
|
Description
•