Conditional Breakpoints in Internet Explorer F12 Developer Tools

Just a quick tip for folks using the F12 Developer Tools in Internet Explorer: You can specify conditional breakpoints in Breakpoints window.

Conditional breakpoints are useful because they will halt execution of the debugger when a condition is met. This can be optimal when dealing with situations where you don’t want to break each and every time a breakpoint is encountered. For example, if I’m only interested in halting execution within a for loop an evenly-divisible index, I can specify the following criteria by simply right-clicking a breakpoint and selecting “Condition…” in the dialog window that appears:

Setting a condition in this manner will visually update the breakpoint listed in the F12 Developer Tools. Breakpoints with conditions are indicated with the following icon:

For what it’s worth, you can also disable breakpoints just as easily. Simply right-click a breakpoint in the code window and select “Disable breakpoint”. Disabled breakpoints are indicated with the following icon:

Here’s what it might look like in the Breakpoints section of the F12 Developer Tools:

Hopefully, this will help you out when debugging script in the F12 Developer Tools of Internet Explorer.