Console Panel

From FirebugWiki

(Difference between revisions)
Jump to: navigation, search
(Added info how to open the options menu)
m (Added link to Firebug 1.9 release notes)
Line 3: Line 3:
== Options Menu ==
== Options Menu ==
-
This menu is reachable via the little arrow in the panel tab ( [[Image:optionsMenuArrow.png]] ) or by right-clicking on on the panel tab (since Firebug 1.9).
+
This menu is reachable via the little arrow in the panel tab ( [[Image:optionsMenuArrow.png]] ) or by right-clicking on on the panel tab (since [[Firebug Release Notes#Firebug 1.9|Firebug 1.9]]).
{| class="wikitable" style="width:100%; vertical-align:top;"
{| class="wikitable" style="width:100%; vertical-align:top;"

Revision as of 06:29, 12 October 2011

Console Panel

The console panel offers a JavaScript command line, lists all kinds of messages and offers a profiler for JavaScript commands.

Contents

Options Menu

This menu is reachable via the little arrow in the panel tab ( File:OptionsMenuArrow.png ) or by right-clicking on on the panel tab (since Firebug 1.9).

Option Preference Description
Enabled extensions.firebug.console.enableSites Enables the Console Panel
Disabled extensions.firebug.console.enableSites Disables the Console Panel
Show JavaScript Errors extensions.firebug.showJSErrors Toggles JavaScript error message display inside the Console
Show JavaScript Warnings extensions.firebug.showJSWarnings Toggles JavaScript warning message display inside the Console
Show CSS Errors extensions.firebug.showCSSErrors Toggles CSS error message display inside the Console
Show XML Errors extensions.firebug.showXMLErrors Toggles XML error message display inside the Console
Show XMLHttpRequests extensions.firebug.showXMLHttpRequests Toggles XMLHttpRequest display inside the Console
Show Chrome Errors extensions.firebug.showChromeErrors Toggles program and add-on internal error message display inside the Console
Show Chrome Messages extensions.firebug.showChromeMessages Toggles program and add-on internal message display inside the Console
Show External Errors extensions.firebug.showExternalErrors Toggles external error message display inside the Console
Show Network Errors extensions.firebug.showNetworkErrors Toggles network error message display inside the Console
Show Stack Trace With Errors extensions.firebug.service.showStackTrace Toggles the inclusion of the stack trace for error messages
Strict Warnings (performance panelty) javascript.options.strict.debug Toggles strict warnings display inside the Console
Command Editor extensions.firebug.commandEditor Toggles between the Command Line and the Command Editor
Show Completion List Popup extensions.firebug.commandLineShowCompleterPopup Toggles the auto-completion of commands while typing

For more info about tweaks available in Firebug please see the full list of preferences.

Panel Toolbar

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.

Clear

Clears the console by removing all messages from the output.

Persist

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.

Profile

Enabling this option lets you profile JavaScript activity. For more info about this feature see the Profiling section.

Memory Profile

If extensions.firebug.memoryProfilerEnable is set to true, there's another button called Memory Profile. Enabling this option lets you profile memory activity. For more info about this feature see the Profiling section.

Command Line

The Command Line is simply used for executing JavaScript commands, but is designed to support people writing code and inspecting objects. For this reason it offers several functionalities. Thereby there are some additional features available inside the Console Panel.

Command Editor

The Command Editor offers you a bigger text field for entering JavaScript commands consisting of several lines. It has an integrated menu for running the command(s), clearing the text field and copying the contents to the clipboard.

Smart paste

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.

Console

The console offers three different functionalities. It is showing all messages Firefox' error console is showing. Furthermore it is displaying the results of the commands you entered into the command line. Last but not least it has an integrated profiler for JavaScript activities. For a detailed description of console commands see the Console API.

Message types

The console knows four different types of messages, which are described below:

Type Command Description
Error console.error(object[, object, ...]) Error messages occurring in JavaScript, CSS, XML, chrome, network and stack trace
Warning console.warn(object[, object, ...]) Warnings occurring in JavaScript and CSS
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.

Click functionality

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.

Profiling

The console also offers functionality to profile JavaScript activity and memory consumption information via two buttons in the Panel Toolbar.

JavaScript Profiling

Pressing the Profile button once starts the JavaScript profiler and clicking it again stops profiling. All JavaScript commands, that were executed while the profiler was active, will be listed including detailed statistics about the calls.

Memory Profiling

Pressing the Memory Profile button once starts the Memory profiler and clicking it again stops profiling. All JavaScript commands, that were executed while the profiler was active, will be listed including statistics about the memory consumption.

See also

Personal tools