Set a conditional breakpoint

This page describes the JavaScript Debugger as it appears in Firefox 52 and above. To see what it's like in earlier versions of Firefox, see Debugger (before Firefox 52).

If you're using Firefox 52 or later and need to switch back to the old Debugger, you can do so by visiting about:config and setting the "devtools.debugger.new-debugger-frontend" preference to false.

A normal breakpoint is just associated with a line: when the program reaches that line, the debugger pauses. A conditional breakpoint also has a condition associated with it, which is represented as an expression. When the program reaches the line, the debugger pauses only if the expression evaluates to true.

To set a conditional breakpoint, activate the context menu in the source pane, on the line where you want the breakpoint, and select "Add Conditional Breakpoint". You'll then see a textbox where you can enter the expression. Press Return to finish.

Conditional breakpoints are shown as orange arrows laid over the line number.

If you context-click on any breakpoint, you'll see a menu item "Edit Breakpoint". You can use this to modify an existing condition or to add a condition to a normal breakpoint.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,