Intent to unship Developer Toolbar (aka GCLI)

98 views
Skip to first unread message

Patrick Brosset

unread,
Mar 26, 2018, 11:25:51 AM3/26/18
to Firefox Dev

(my apologies to people both here and on dev-developer-tools for sending this twice to them).


Tl;dr: The DevTools team is planning to pref off and later unship the Developer Toolbar (aka GCLI), starting in Firefox 60.


The Developer Toolbar [1] gives a command line access to some power-user and developer actions in Firefox.

It can be opened via the tools menu or with shift+F2 and appears as a footer bar at the bottom of the browser window.


Some of the commands it supports are: restart (to restart firefox), screenshot (to take a screenshot of the page), opening DevTools, listing cookies, listing prefs, listing addons, etc.


It is based on GCLI [2] which is vendored in mozilla-central.


It was added to Firefox back in 2012 (in Firefox 17 I believe), but has never received much usage over the past 6 years.

The main reasons being that it's a fairly hard to discover and that it's a tool only for people comfortable with a command line environment.


As of Firefox 60 we intend to pref off the developer toolbar, and then remove the associated code from Firefox in 61.


The reasons for this are:


- Both the Developer Toolbar UI and the GCLI upstream library have become unmaintained.

- Some of its features are broken, some ever since e10s ([3][4]).

- It is blocking the UnsafeSetInnerHTML work [5].

- Usage numbers are very low.

- Alternatives exist for the most used commands.

- We have other ideas for allowing power users to access common actions via the keyboard which appear more adapted and more DevTools-related (e.g. having special commands in the DevTools console, or having a command palette like Chrome has which originally came from text editors like Sublime Text).


The meta bug to follow the work around unshipping the Developer Toolbar is [6].


[1] https://developer.mozilla.org/en-US/docs/Tools/GCLI

[2] https://github.com/joewalker/gcli

[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1228034

[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1376726

[5] https://bugzilla.mozilla.org/show_bug.cgi?id=1444394

[6] https://bugzilla.mozilla.org/show_bug.cgi?id=1429421


Ehsan Akhgari

unread,
Mar 27, 2018, 9:36:42 AM3/27/18
to Patrick Brosset, Firefox Dev
Hi Patrick,

Every now and then I have used the "security csp" command to view the CSP policy of a site.  This information is also present in the network monitor by looking at the HTTP headers, but the network monitor UI doesn't make it easy to look at long header values (and interesting CSP values are typically expressed as such).  Is there any plans to move that part of this old interface into a more modern part of the devtools UI?

Thanks,
Ehsan

_______________________________________________
firefox-dev mailing list
firef...@mozilla.org
https://mail.mozilla.org/listinfo/firefox-dev




--
Ehsan

Patrick Brosset

unread,
Mar 27, 2018, 11:09:54 AM3/27/18
to Ehsan Akhgari, Firefox Dev
Thanks for the feedback Ehsan.

You're right, the network monitor sidebar tab shortens long headers, and that makes it harder to read/copy them.
I guess one option is to click on the "raw headers" button above to see them a little more clearly that way.

We do have a bug on file for making headers easier to read and copy: https://bugzilla.mozilla.org/show_bug.cgi?id=1447267

Patrick

Tom Schuster

unread,
Mar 27, 2018, 11:12:51 AM3/27/18
to Patrick Brosset, Ehsan Akhgari, Firefox Dev
I have heard of people using this to restart Firefox, is that usage
really so low? I personally like to use this for screenshots, but
"Firefox screenshots" replaced most of my main usage of taking
fullscreen images.

Patrick Brosset

unread,
Mar 27, 2018, 12:13:05 PM3/27/18
to Tom Schuster, Ehsan Akhgari, Firefox Dev
Re: screenshots: there are indeed other ways to take screenshots of webpage (or even individual dom nodes) by either using firefox screenshots of devtools. So losing the screenshot command shouldn't be a big problem.
Still having the --fullpage and --dpi options available somehow through devtools would be good. This is captured in bug https://bugzilla.mozilla.org/show_bug.cgi?id=1282462

You are right, restart is the most used command, and we have discussed with several people using it. The reason for its usage is the fact that it is the fastest way for people to restart the browser: shift+F2, type the first few characters of restart, press tab, press enter, done.

There are multiple other ways to do this though:
- If you started firefox from the command line:
  focus the terminal window Firefox was started from and do ctrl+C, up arrow, enter.
- Otherwise, there are usually other keyboard shortcuts available in most operating systems to do this still:
  on Mac: cmd+Q, cmd+space, type the few first characters of Firefox, press enter
  on Windows: press alt+F4, press the windows key, type the few first characters of Firefox, press enter.
- And finally, you can also do it from Firefox itself:
  open a new tab (which can be done via the keyboard), type about:profiles, click the restart button there (I have also filed a bug to make this button keyboard navigable: https://bugzilla.mozilla.org/show_bug.cgi?id=1444916).

So, for restart, there are several ways to achieve the same.

As for usage numbers, yes, they are really low. Most commands aren't used at all (like, 1 usage per day on some, which is probably me ;) ).
Hard to argue for keeping that much code when usage is very low.
The restart command is used on average around 50 times per day on nightly only. So, most probably far less on release.

bruno ais

unread,
Mar 27, 2018, 1:32:15 PM3/27/18
to Patrick Brosset, Firefox Dev
Restarting isn't necessarily as straightforward as that for people like me.
In windows, if I CTRL+F4, then try starting firefox as you tell (I don't start firefox from the command line), I always get the warning firefox is still running. I have to wait a small while until the process terminates. Then I can start firefox.
For the other alternative, for the "about:profiles". I open a tab, it will open on the farest right. I restart firefox.... After restarting, how do I return to the tab where I was at? Closing the "about:profiles" won't do. It will load a tab that was next to it which could be something very different.

For me, none of those replace the "Shift+F2 rest<tab><Enter>". Only a simple button would. Maybe under "File" like some XUL extensions that in the past.

Gijs Kruitbosch

unread,
Mar 27, 2018, 2:03:24 PM3/27/18
to bruno ais, Firefox Dev
On 27/03/2018 18:30, bruno ais wrote:
> For the other alternative, for the "about:profiles". I open a tab, it
> will open on the farest right.
It won't if you middle (or ctrl/cmd-) click the new tab button, it'll
open a new tab immediately beside the current tab. I'm pretty sure there
are webextension add-ons that can make this the default.

Also, if you're having to do this with a normal browser session, I'd
rather figure out why you need to restart so often that removing GCLI
would be problematic for you, than optimizing something that most users
shouldn't need to do regularly anyway.

~ Gijs

Felipe G

unread,
Mar 27, 2018, 2:11:22 PM3/27/18
to Firefox Dev
Wasn't a developer-only keyboard shortcut introduced recently to restart Firefox?  (or something along these lines)
If it wasn't, I think we should add one like this (maybe enabled by default on Nightly builds?)

I agree that none of the suggested alternatives is a perfect replacement (except the command line one), because you usually want to restart the same build with the same profile that was running, and the OSX/Windows Quick Finder won't allow that to be done easily.

(I don't use this myself as I start my builds from the command line, but I know that e.g. Softvision people use this a lot during their testing)

bruno ais

unread,
Mar 27, 2018, 2:12:20 PM3/27/18
to Gijs Kruitbosch, Firefox Dev
I'd rather have an alternative, tbh. I very recently went from firefox 56 to firefox 59, after trying to get alternative in web extensions of what I currently use. Some of it, I had to make it myself.

Gijs Kruitbosch

unread,
Mar 27, 2018, 2:17:34 PM3/27/18
to Felipe G, Firefox Dev
Yes, there's a File > Restart (cmd-alt-r shortcut on mac, ctrl-alt-r elsewhere) for local builds ( https://groups.google.com/d/msg/firefox-dev/Tme95bp3EHY/ow-l077FAAAJ ). It's not present for regular nightly builds, but even if we did that it apparently wouldn't help Bruno who just commented that he's using release. We couldn't ship this to release because ctrl-alt shortcuts don't work well for keyboard layouts that use AltGr on Windows for some characters, and because it ought to be useless for most users.

I'm still interested to know why people feel they need this on release (ie not for QA / development).

~ Gijs

Daniel Veditz

unread,
Mar 27, 2018, 7:29:49 PM3/27/18
to Patrick Brosset, Ehsan Akhgari, Firefox Dev, Christoph Kerschbaumer
On Tue, Mar 27, 2018 at 8:09 AM, Patrick Brosset <pbro...@mozilla.com> wrote:
On Tue, Mar 27, 2018 at 3:35 PM, Ehsan Akhgari <ehsan....@gmail.com> wrote:
Every now and then I have used the "security csp" command to view the CSP policy of a site.

You're right, the network monitor sidebar tab shortens long headers, and that makes it harder to read/copy them.
I guess one option is to click on the "raw headers" button above to see them a little more clearly that way.

A site's effective CSP can be the intersection of multiple CSP headers. In addition the CSP can be specified in a <meta> tag in the document rather than a header. The GCLI view was more accurate as well as more convenient than trying to figure it out from headers. It would be nice if the CSP view could be migrated to somewhere else in devtools, though I'm not sure what would make sense.

-
​Dan Veditz​

Sebastian Zartner

unread,
Mar 28, 2018, 7:51:07 AM3/28/18
to Patrick Brosset, Tom Schuster, Ehsan Akhgari, Firefox Dev
On 27 March 2018 at 18:12, Patrick Brosset <pbro...@mozilla.com> wrote:
> You are right, restart is the most used command, and we have discussed with several people using it. The reason for its usage is the fact that it is the fastest way for people to restart the browser: shift+F2, type the first few characters of restart, press tab, press enter, done.
>
> There are multiple other ways to do this though:
> - If you started firefox from the command line:
> focus the terminal window Firefox was started from and do ctrl+C, up arrow, enter.
> - Otherwise, there are usually other keyboard shortcuts available in most operating systems to do this still:
> on Mac: cmd+Q, cmd+space, type the few first characters of Firefox, press enter
> on Windows: press alt+F4, press the windows key, type the few first characters of Firefox, press enter.
> - And finally, you can also do it from Firefox itself:
> open a new tab (which can be done via the keyboard), type about:profiles, click the restart button there (I have also filed a bug to make this button keyboard navigable: https://bugzilla.mozilla.org/show_bug.cgi?id=1444916).

Please note that the first two options work differently than the
restart command in that they do not restore the browser session.
So, only the third option is currently an equivalent (but cumbersome)
alternative to the restart command.

Sebastian

J. Ryan Stinnett

unread,
Mar 28, 2018, 10:02:08 PM3/28/18
to Gijs Kruitbosch, Felipe G, Firefox Dev
I don't have much new to add about why people are restarting...

However, I was wondering would a restart URL similar to Chrome's chrome://restart be acceptable in Firefox (probably as about:restart)? This seems like it be useful for the QA case, as it would offer something easy to activate from the keyboard (Cmd / Ctrl-L, enter about:restart) that works in all released builds.

- Ryan

Gijs Kruitbosch

unread,
Mar 29, 2018, 4:34:24 AM3/29/18
to J. Ryan Stinnett, Firefox Dev

Re: about:restart... I guess, if that's a thing that would help people? It feels pretty scary in terms of opening a weird security vector where people could DoS users if they managed to load that URL (or clickjack users into dragging it to the URL bar, or...). With appropriate safeguards I suppose it would be fine...

~ Gijs

Sebastian Zartner

unread,
Mar 29, 2018, 7:13:14 AM3/29/18
to Gijs Kruitbosch, Felipe G, Firefox Dev
On 27 March 2018 at 20:17, Gijs Kruitbosch <gijskru...@gmail.com> wrote:
> I'm still interested to know why people feel they need this on release (ie
> not for QA / development).

Two use cases I can think of are:

* Reducing memory usage (as only the page of the active tab will be
loaded by default)
* "Fixing" temporary bugs like display issues, aggressive browser caching, etc.

In the past there were other smaller use cases like e.g. getting rid
of the message to undo an addon removal.

Sebastian

B B

unread,
Mar 29, 2018, 10:24:30 AM3/29/18
to firef...@mozilla.org
I use it similarly: "keep my session but unload everything for now". I
also use it when (since Quantum) add-ons just cease working (randomly;
irreproducibly; infrequently) until I restart (which, of course, I want
to maintain my session when I do so).

Brunoais

unread,
Mar 29, 2018, 10:24:37 AM3/29/18
to J. Ryan Stinnett, Firefox Dev

Would it change the current URL in Firefox prior to the restart or would the URL revert back  to the one before during the restart process?


On 29/03/2018 03:01, J. Ryan Stinnett wrote:

bruno ais

unread,
Mar 29, 2018, 10:24:47 AM3/29/18
to Gijs Kruitbosch, Felipe G, Sebastian Zartner, Firefox Dev
Those are, in summary, why I use the restart.
  • Firefox has small memory leaks. Quite noticeable on my weak work slim portable windows PC, after ~12 hours use.
  • I have MANY webextensions installed. About half just to try giving some of the features that were gone with firefox 57 (some stuff are actually very slow with the new API). Some also fill pages with metacontent and overlay content which doesn't seem to be properly garbage collected (no proof to show).
  • I use quite some tabs open. Discarding does not seem to be reducing as much memory as the new lightweight tabs is capable of.
  • Some SPA (*cof* gmail) I require for work abuse memory use.... Reloading the page won't do enough due to storage usage... Which firefox caches in RAM... Which goes to swap.

Yuri Khan

unread,
Mar 29, 2018, 10:25:26 AM3/29/18
to Gijs Kruitbosch, J. Ryan Stinnett, Firefox Dev
On Thu, Mar 29, 2018 at 3:34 PM, Gijs Kruitbosch
<gijskru...@gmail.com> wrote:
>
> Re: about:restart... I guess, if that's a thing that would help people? It
> feels pretty scary in terms of opening a weird security vector where people
> could DoS users if they managed to load that URL (or clickjack users into
> dragging it to the URL bar, or...). With appropriate safeguards I suppose it
> would be fine...

It would be pretty funny if it got into session restore.

bruno ais

unread,
Mar 29, 2018, 10:57:15 AM3/29/18
to Yuri Khan, J. Ryan Stinnett, Firefox Dev, Gijs Kruitbosch
I can imagine after solving that bug, waiting months to solve the about:sessionrestore bug where about:restart was being included in the list. Not to mention the large amount of  bug reports of ppl telling that firefox was restarting every time they open a session, or even about infinite restart cycles....
Reply all
Reply to author
Forward
0 new messages