Closed Bug 1978100 Opened 8 months ago Closed 7 months ago

Focus tab toolbox in background tab when hitting breakpoint

Categories

(DevTools :: about:debugging, defect, P3)

Firefox 136
defect

Tracking

(firefox143 fixed)

RESOLVED FIXED
143 Branch
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:

  1. open debugger for an arbitrary extension using technical url:

about:devtools-toolbox?type=extension&id={EXTENSION_ID}

  1. set a breakpoint

  2. do something to trigger the breakpoint

  3. close the debugger tab

  4. open about:debugging page / This ... / Extensions and press Inspect button

  5. 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

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.

Flags: needinfo?(support)

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:

https://github.com/ewnjtgouierg/ffbugs/tree/1d6470291f710346d6d0d74c77f5f9253f7cad11/BreakPointsInExtension

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

Flags: needinfo?(support)

p.s. i only tested in versions 136 and 138

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

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.

Type: defect → enhancement
Summary: breakpoints in debugger opened in a tab via url (rather than using "Inspect" button from the about:debugging page) don't work → Tab Toolbox in background tab could be focused / highlighted when hitting breakpoint
See Also: → 1742761

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)

Alright, I guess that could also be useful if you have regular tab toolboxes not related to webextension debugging.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Type: enhancement → defect
Ever confirmed: true
Priority: -- → P3
Summary: Tab Toolbox in background tab could be focused / highlighted when hitting breakpoint → Focus tab toolbox in background tab when hitting breakpoint
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fa6ff747e61e https://hg.mozilla.org/integration/autoland/rev/d7eb324b222d [devtools] Focus tab toolbox in background tab when hitting breakpoint r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: