The Developer Toolbar gives you command-line access to a number of developer tools from within Firefox. The Developer Toolbar is a Graphical Command Line Interpreter: it has the power and conciseness of a command line, but provides integrated help for its commands and can display rich output. It's also extensible: you can add your own local commands and even convert them to add-ons so other people can install them too.
Opening the Developer Toolbar
To open the Developer Toolbar press Shift+F2, or go to the Web Developer menu (which is a submenu in the Tools menu on Mac OSX and Linux) and choose "Developer Toolbar". It appears attached to the bottom of the browser, like this:
The prompt for the command line takes up most of the toolbar, with a "Close" button on the left and a button to toggle the Toolbox on the right.
Apart from the "Close" button, Shift+F2 or the "Developer Toolbar" menu item both toggle the toolbar off.
Using the command line
Like a normal command line, you execute commands by typing them at the prompt and pressing Enter.
As you type, the Developer Toolbar suggests a possible completion to your command:
If there is more than one possible completion, the Up and Down arrow keys cycle through the suggestions. Pressing Tab selects the current suggestion.
Pressing F1 will display all the suggestions in a list, with a summary of what each command will do:
Typing "help" will show a list of all commands:
Typing "help <command>" will give you the help for <command>:
Since the Developer Toolbar provides built-in help for the commands it supports, we haven't provided complete documentation for the supported commands here. To get complete documentation for <command>, type "help <command>" into the toolbar.
|addon||List all installed add-ons, disable or enable a specific add-on.|
|appcache||View and manipulate appcache entries.|
|break||List, add, and remove breakpoints.|
|calllog||Log function calls to the Console.|
|connect||Connect to a remote server: subsquent commands will be run on the server.|
|console||Open, close, and clear the Console.|
|context||Add a prefix to future commands.|
|cookie||List, remove, and set cookies.|
|dbg||Commands to control the Debugger.|
|disconnect||Disconnect from a remote server.|
|edit||Edit one of the resources loaded by the page.|
|export||Export the page.|
|help||Show all available commands.|
|inspect||Examine a node in the Inspector.|
Extending the Command Line
It's easy to add commands to the command line, either using scratchpad or a mozcmd directory.
See instructions for extending the command line using:
- A 'mozcmd' directory (requires some setup, commands are persistent)
- The Scratchpad (requires very little setup, commands not persistent, but can be converted to be addons)
Contributing to the Command Line
The Firefox command line is buit using the GCLI project, which has a significant section of documentation on GCLI and how it works. There is also documentation specific to integrating GCLI and Firefox on MDN.