(Updated panel options)
m (Linked Command Line)
|Line 53:||Line 53:|
== Command Line ==
== Command Line==
Revision as of 10:52, 6 April 2011
Options Mini Menu
|Enabled|| ||Enables the Console Panel|
|Disabled|| ||Disables the Console Panel|
|Show CSS Errors|| ||Toggles CSS error message display inside the Console|
|Show XML Errors|| ||Toggles XML error message display inside the Console|
|Show XMLHttpRequests|| ||Toggles XMLHttpRequest display inside the Console|
|Show Chrome Errors|| ||Toggles program and add-on internal error message display inside the Console|
|Show Chrome Messages|| ||Toggles program and add-on internal message display inside the Console|
|Show External Errors|| ||Toggles external error message display inside the Console|
|Show Network Errors|| ||Toggles network error message display inside the Console|
|Show Stack Trace With Errors|| ||Toggles the inclusion of the stack trace for error messages|
|Strict Warnings (performance panelty)|| ||Toggles strict warnings display inside the Console|
|Command Editor|| ||Toggles between the Command Line and the Command Editor|
|Show Completion List Popup|| ||Toggles the auto-completion of commands while typing|
For more info about tweaks available in Firebug please see the full list of preferences.
Break On All Errors
As some of the other panels the console panel offers a "Break On..." feature. In this case it's "Break On All Errors", which means, that as soon as an error occurs the script execution is stopped.
Clears the console by removing all messages from the output.
The "Persist" option prevents clearing the console at a page reload. That means, the messages will stay inside the console as long as this option is enabled.
To support the user analysing elements and writing code the command line integrates an auto-completion for the commands you are typing. Therefore after starting to type a command you simply have to press tab and Firebug is completing the command. If there are several commands starting with the same phrase like "getElem" then pressing tab several times alphabetically switches through all available commands. Thereby also the global variables, which you defined in your script, are used.
If you are pasting code into the command line, that consists of several lines, the command editor is automatically opened to keep the line breaks.
The entered script can be copied as bookmarklet via the menu of the command editor.
Shortcuts for inspected elements
The command line and the command editor offer you the possibility to easily access elements inside the DOM similar to the sizzle selector library integrated in the jQuery Framework. For a detailed description of the available commands see the Command Line API.
Inspect object in other panel
How you inspect elements using the console is described above. Besides that it's also possible to inspect them in the most appropriate panel by hitting Shift+Enter instead of just Enter.
The console knows four different types of messages, which are described below:
|Info||console.info(object[, object, ...])||Informative messages|
|Debug||console.debug(object[, object, ...])||Debugging messages|
See also the Console API for more information about the different commands.
Console messages offer you different kinds of options you can access via the mouse buttons resp. the mouse wheel. E. g. clicking on the links in an error message or warning jumps directly to the appropriate panel. Right clicking on them gives you the possibility to copy the message to the clipboard or set a breakpoint for the specific error or all errors. XML HTTP requests thereby let you copy the location or response body via the context menu. Clicking on them shows you detailed information about the request. And middle-clicking opens the requested URL in a new tab.