Unshipping the GCLI (AKA Developer Toolbar)


We’re removing the GCLI from DevTools and migrating the most common features to more suitable/discoverable places. We aim to create minimal disruption in GCLI users’ workflows.

GCLI is unmaintained, broken at places (due to e10s etc), blocking the work to remove setUnsafeInnerHTML, and most of their features are not used. Maintaining the tests takes away developer time; running them uses valuable automation time.

Timeline (most recent events first)

We are now refactoring features that rely on GCLI (to not to use it) and/or that we want to keep (see below for details)

The last step will be to eventually remove the rest of the code and tests.

September 17, 2018 - GCLI Bugzilla component moved to the graveyard

From today on, GCLI related bugs have been moved to the graveyard.

September 6 2018 - The GCLI codebase has been removed

All GCLI related code has been removed and this change will take effect from Firefox 64 onwards. The removal was taken care of on the 4th of September and landed Successfully

What does this mean?

GCLI was one of our last components that was not remote-ready, and was no longer maintained. The most used functions have been moved to new homes (screenshot, and restart) and UIs that used GCLI under the hood have been migrated to be remote-friendly and better integrated into the codebase.

User facing changes are minimal, with the exception of the screenshot command that was added in July.

20 August 2018 - none of the screenshot options use GCLI code anymore

This includes the optional buttons in the UI, and the console command.

4th July 2018 -  screenshot command line is migrated and accessible in the console

The previous functionality is now available via the normal console panel, accessible via Tools -> Web Developer -> Web Console, or ⌥⌘K (Mac) or alt+ctrl+J (Win/Linux).

The only difference in syntax is that now users have to prefix the command with a semicolon, for example:

:screenshot --fullpage --dpr 0.5 cnn-no-css

And we have a bonus here: the screenshot command now works with remote targets. This means that if you’re connected to a remote target, you can take screenshots of the remote target as if it were your local Firefox. (Note: you’ll need to be running a Nightly from 4th the May onwards in both the Firefox used to debug and connect, and on the remote target, because the changes involved modifications in the server code to enable remote screenshots).

For example, right now you could use this to connect to Firefox for Android with WebIDE and take screenshots of what you see in the Android device, saving them directly to your downloads folder in the desktop.

This is the reason why implementing this took a bit longer than expected; it wasn’t just a port, there was some reworking involved.

If you’re interested in the nitty gritty details, you might want to look at the Bug: 1464461 - Implement screenshot command in the console panel. Specially the code reviews, where we look into modernising the old code to use async/await; notice how much clearer the code results! For example, this comment.

The next step, screenshots wise, is to refactor the code in the screenshot button to not use the GCLI screenshot code.

This will stop using old code soon...

18 May 2018 - GCLI UI is removed

The GCLI UI has been removed from the code base (only the UI, as some features of DevTools rely on the non UI GCLI code to work).

5th May 2018 - Restart alternative

Based on the responses to the initial intent to unship email, the feedback in the tracking bug, the responses to our questions to various Firefox developers and QA engineers, and looking at our telemetry data on usage, the critical feature is the restart command.

We have provided an alternative to restart. It is available in Nightly since the 5th of May 2018:

The plan

✅ Migrate restart command

(5th May 2018)

✅ Disable GCLI UI

(18th May 2018)

Refactor features that either rely on GCLI or that we want to keep

Delete and END

  1. ✅ Migrate restart command (details) (bug)
  2. ✅ Remove GCLI UI (toolbar, shortcuts, ...) (patch) (bug)
  3. Refactor/migrate other top commands or command options
  1. 🔜 screenshot options (e.g. dpr, fullscreen), perhaps (to|connected with) RDM
  2. security to Application panel (includes security csp subcommand, etc)
  3. listen needs to be documented to use a command line launch parameter
  1. Refactor other features to stop relying on GCLI
  1. Toolbox buttons: ruler, measure, screenshot buttons (bug)
  2. Eyedropper Web Developer menu (bug)
  3. Screenshots from the inspector (bug)
  4. GCLI test helper used outside of gcli folders (bug)
  1. Delete the rest (framework, commands implementation, actor/client), document the removal of this functionality and alternatives, where required
  2. END

We will update this document as work progresses.