Opening the Web Console

To open the Web Console:

  • either select "Web Console" from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on Mac OS X)
  • or press the CtrlShiftK (CommandOptionK on OS X) keyboard shortcut.

The Toolbox will appear at the bottom, left, or right of the browser window (depending on your docking settings), with the Web Console activated (it's just called "Console" in the DevTools toolbar):

The Web Console's interface is split into three horizontal sections:

  • Toolbar: along the top is a toolbar containing three buttons. Click the garbage can button to clear the contents of the console. Click the funnel icon to filter the messages that are displayed in the console. The checkbox on the righthand side of the Toolbar allows you to turn on the Persist Logs (console doesn't clear on page reload, or new page load)
  • Command Line: the command line starts with double angle brackets (>>). Use it to enter JavaScript expressions
  • Message Display Pane: the messages generated by the code in the page and by the commands entered on the command line are displayed following each command

Note: You can clear the contents of the console by entering the keyboard command Ctrl + Shift + L (Windows, macOS, and Linux) or Cmd + K on macOS.