Options Menu
This menu is reachable via the little arrow in the panel tab ( ) or by right-clicking on on the panel tab (since Firebug 1.9).
|Enabled|| ||Enables the Script Panel|
|Break On Exceptions|| ||Toggles the functionality to stop the script execution on exceptions|
|Ignore Caught Exceptions|| ||Specifies whether the script execution should also be stopped on caught exceptions|
|Show Break Notifications|| ||Toggles the display of break notifications|
For more info about tweaks available in Firebug please see the full list of preferences.
 Panel Toolbar
 Break On Next
The Break On Next button ( ) gives you the possiblity to stop the script at the next executed command. This can be a user action, a timeout or anything else that causes script execution. As soon as you click on the button, it is armed. When any script execution occurs now, the debugger will halt the script and you can step through it.
There are several other Break On ... features available at the other panels.
 Script Type Menu
The Script Type Menu filters the Script Location Menu by different types of scripts. Thereby three different kinds of scripts are distinguished:
|static||All scripts, that are loaded together with the page (via the <script> tag)|
|eval()||Scripts, that are executed using the eval() function (typically scripts loaded via an XMLHttpRequest)|
|event||Scripts, that are generated through an event (like e. g. client side table sorting)|
You have the option to just show static scripts, static + eval scripts, static + event script or all types of scripts.
 Script Location Menu
All scripts filtered by the type(s) selected in the Script Type Menu will be shown inside this menu. Any characters you type on the keyboard while the list of files is open will filter the list to make it easier to find files. By selecting one of the scripts it will be shown inside the Main Panel.
If you right-click on the file list, you'll get options for opening the script in a separate browser tab, copying its location to the clipboard, or opening it inside the DOM Panel.
 Pretty-Print Button
Note: This feature currently just works on external static scripts.
 Stack Frame Path
When the script execution is halted, the toolbar contains a bread crumb path listing the call stack frames for the function, in which the execution is stopped.
 Execution Control Buttons
The execution buttons are enabled as soon as the debugger is stopped. There are four buttons, which can be used for debugging:
|Rerun|| ||Reruns the current call stack (see Honza's blog post for more info) (Firebug 2.0, see issue 6789)|
|Continue|| ||Continues script execution until the next breakpoint or the execution ends|
|Step Into|| ||Jumps into the body of executed functions, so you can debug them|
|Step over|| ||Executes functions, but doesn't jump into them, instead moves to the next line of the same scope|
|Step out|| ||Executes the rest of the current function and jumps back to it's caller|
 Script View
<script> or dynamically evaluated code created via
eval() or event listeners.
 Breakpoint Column
 Setting breakpoints
By clicking on it a breakpoint is set for the line. Clicking it again removes the breakpoint again.
 Breakpoint conditions
For manually set breakpoints you also have the possibility to set conditions, at which they trigger. Doing so opens the Breakpoint Condition Editor:
These conditions can be very complex, but most of the time you'll want to limit breaking to specific variable values. An example for this could be having a counter and you want to stop execution when the counter reaches a specific value. Another situation would be to stop execution when a specific variable is defined resp. undefined.
 Break Notifications
Break notifications provide information on why the script execution was halted. These notifications are displayed when a special breakpoint was triggered.
|Error Break Notification||Displayed when halted at an error breakpoint|
|HTML Mutation Break Notification||Displayed when halted at an HTML breakpoint|
|DOM Property Change Break Notification||Displayed when halted at a DOM breakpoint|
|XHR Break Notification||Displayed when halted at an XHR breakpoint|
|Cookie Change Break Notification||Displayed when halted at a cookie breakpoint|
Break notifications can be disabled by unchecking the "Show Break Notifications" option inside the options menu.
 Variable Tooltips
When the debugger halted the script, you are able to get information about the script variables by hovering them. A popup will appear showing the current value of the hovered variable.
Furthermore when an expession is selected the tooltip will display the result of the expression when when it's hovered.
 Side Panels
The Side Panels of the Script Panel offer different useful information and functionality about the executed scripts.
The Watch Side Panel offers the possibility to enter watch expressions allowing to follow changes of variable values while debugging.
The Stack Side Panel contains information about the call stack trace for the currently debugged function.
The Breakpoints Side Panel lists the defined breakpoints and gives the possibility to toggle their activation plus additional options for changing the behavior of the breakpoints.
The text input box in the upper right corner searches the source code. When you click in to the box, an auxiliary panel allows you to pick search direction, single or multiple files, and case sensitivity. The text has special case code to support:
- Go to Line: The symbol # followed by a number will incrementally move the line number,
- Case by Case: If the case sensitivity setting is not used, then an all lower case word will mean case-insensitive search, but a mixedCase word will cause case sensitive matches.