Open Bug 1552956 Opened 5 years ago Updated 6 months ago

[remote-dbg-next] Allow to inspect targets in a window instead of a tab

Categories

(DevTools :: about:debugging, enhancement, P2)

enhancement

Tracking

(Not tracked)

People

(Reporter: mkaply, Unassigned)

References

(Blocks 1 open bug)

Details

In prior versions of Firefox, you could click Debug below an add-on and it would bring up the Browser toolbox allowing you to debug Firefox in a separate process.

The new about:debugging brings up the debugger in a new tab which makes it difficult to debug some issues in add-ons (particularly tab related)

The documentation:

https://developer.mozilla.org/en-US/docs/Tools/about:debugging#Connecting_to_a_remote_device

Says it should still work the old way:

"If you click Inspect, you'll see a dialog asking you to accept an incoming connection. Click "OK", and the Add-on Debugger will start in a separate window. Note that sometimes the debugger window is hidden by the main Firefox window."

The documentation:
https://developer.mozilla.org/en-US/docs/Tools/about:debugging#Connecting_to_a_remote_device

The documentation is outdated and will be replaced with the new one once the new about:debugging is released. We used to have to spawn a new Firefox to debug extensions, but all extensions should now run out-of-process so we used this opportunity to simplify this and make the workflow more consistent (previously, addons would be debugged in a separate Firefox instance, workers would be debugged in a new window but same FF instance, tabs would be debugger in an about:devtools-toolbox tab etc...).

The new about:debugging brings up the debugger in a new tab which makes it difficult to debug some issues in add-ons (particularly tab related)

We can probably add an option or a shortcut to immediately open this new tab as a new new window (with or without chrome UI). Can you be more specific about the "issues" this workflow creates for you?

Type: defect → enhancement
Flags: needinfo?(mozilla)
Priority: -- → P3

The new about:debugging brings up the debugger in a new tab which makes it difficult to debug some issues in add-ons (particularly tab related)

We can probably add an option or a shortcut to immediately open this new tab as a new new window (with or without chrome UI). Can you be more specific about the "issues" this workflow creates for you?

This is really self-evident:
simple load a temp addon any type: browser.tabs.query({active: true}) and see what you can get.

We can probably add an option or a shortcut to immediately open this new tab as a new new window (with or without chrome UI). Can you be more specific about the "issues" this workflow creates for you?

It's not an issue once it occurred to me to drag the tab out of Firefox into a new window.

But in general, when debugging extensions, it doesn't make sense to try to debug in the same window (especially when in a lot of cases, you are debugging page content).

We should put the addon debugger in a separate window even if it isn't a separate process.

Flags: needinfo?(mozilla)

(In reply to Mike Kaply [:mkaply] from comment #4)

We can probably add an option or a shortcut to immediately open this new tab as a new new window (with or without chrome UI). Can you be more specific about the "issues" this workflow creates for you?

It's not an issue once it occurred to me to drag the tab out of Firefox into a new window.

But in general, when debugging extensions, it doesn't make sense to try to debug in the same window (especially when in a lot of cases, you are debugging page content).

We should put the addon debugger in a separate window even if it isn't a separate process.

Thanks for confirming, I was afraid some scenarios might still require to have a debugger in another Firefox instance :)
I think we should add a preference, which when set to true, would lead to open all debug targets in new windows rather than in new tabs (devtools.aboutdebugging.open-target-in-window or similar).

We can then decide whether this preference should default to true, and if we need to surface it in the UI (maybe in the Setup page of about:debugging?)

Priority: P3 → P2
Summary: Clicking Inspect on an add-on brings up the debugger in a new tab → [remote-dbg-next] Allow to inspect targets in a window instead of a tab
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.