[remote-dbg-next] Addon debugging can block Firefox main process if extensions.webextensions.remote is false
Categories
(DevTools :: about:debugging, defect, P3)
Tracking
(Not tracked)
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 2 open bugs)
Details
We started using an about:devtools-toolbox tab in order to debug addons and unify our debugging workflows. This was based on the assumption that all addons/webextensions were running out of process. However it turns out the OOP behavior for webextensions can still be disabled via the preference extensions.webextensions.remote
.
If a user sets extensions.webextensions.remote
to false, then breaking on the addon script can block the main thread of Firefox.
We have two options here when this pref is false:
- disable addon debugging and display an error message
- fallback to the browser toolbox to debug addons in this case
Talking to :rpl it seems that extensions.webextensions.remote=false
is not really a supported setup, so I would lean towards the first option. But it would be nice to get a sense of how many users are actually having this preference set to false before taking a decision.
Comment 1•6 years ago
|
||
Bugbug thinks this bug is a enhancement, but please change it back in case of error.
Reporter | ||
Comment 2•6 years ago
|
||
I think this one should remain a defect :)
Reporter | ||
Comment 3•6 years ago
|
||
Hi Harald,
Do you know how we could assess the % of users with extensions.webextensions.remote=false
?
That would help deciding the priority here (will assign P3 in the meantime).
Thanks!
Comment 4•6 years ago
|
||
My hunch would be, agreeing with Julian's assessment, to disable addon debugging for users who changed that pref, as it is untested territory for the toolchain.
:fallen, is this something the webext team can help inform?
Comment 5•6 years ago
|
||
To obtain data about % of users with OOP disabled for WebExtensions you could add a telemetry probe checking for that pref. Looking at the code it seems OOP WebExtensions is disabled by default in toolkit and specifically enabled in Firefox Desktop. This leaves out Firefox for Android, but given debugging there is remote anyway that doesn't seem like much of a problem. It is something to keep in mind though when doing the telemetry probes.
If you want to gather telemetry on this I'm happy to get you in touch with someone from the data team that could help add those probes. From a brief look at the docs it is just a matter of using Services.telemetry to set a scalar. See https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/collection/scalars.html and more generally https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/start/adding-a-new-probe.html
Now, putting my Thunderbird hat on: Thunderbird doesn't have OOP enabled, and hence also doesn't use OOP WebExtensions. If falling back to the browser toolbox isn't a major effort to write and maintain, the team would appreciate going that route.
Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Philipp Kewisch [:Fallen] [:📆] from comment #5)
Now, putting my Thunderbird hat on: Thunderbird doesn't have OOP enabled, and hence also doesn't use OOP WebExtensions. If falling back to the browser toolbox isn't a major effort to write and maintain, the team would appreciate going that route.
Thanks for the feedback and good point about Thunderbird. I think the TB use case is more critical than Firefox Desktop users who might have turned off OOP extensions. TB extension developers don't have the option to enable OOP extensions. If we disable the Inspect button when OOP extensions are disabled, they won't be able to work on TB addons at all.
To be clear, if we end up reintroducing the browser toolbox flow for addon development, it will most likely be untested and might regress from time to time. The other option would be to start Thunderbird as a remote debugging server, and debug the addons from a Firefox instance.
Comment 7•6 years ago
|
||
If you want to gather telemetry on this I'm happy to get you in touch with someone from the data team that could help add those probes.
Sorry for not phrasing the ni? better, I didn't mean to imply that we need telemetry. I would prefer to avoid landing new telemetry to answer this, but would recommend to message to that they need to disable the legacy OOP config if they want to debug extensions.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•3 years ago
|
Description
•