Setting a Breakpoint Hit Count

Control the number of times a breakpoint is hit before it stops execution, or track the hit count.

By default, execution breaks every time it hits a breakpoint. However, you might not always want to interrupt execution. For example, you might want to simply check the progress of a loop at a breakpoint. To change how frequently a particular breakpoint interrupts execution, you can change its hit count property.
  1. Open the Hit Count dialog box for a breakpoint:
    • In the Breakpoints window, right-click a breakpoint and select Hit Count.
    • In a Script Editor or Call Stack window, right-click a breakpoint and select Breakpoints > Hit Count .
  2. Specify when the breakpoint responds to the hit count:
    • break always (the default)
    • break when the hit count is equal to
    • break when the hit count is a multiple of
    • break when the hit count is greater or equal to
  3. If you choose an action other than break always, specify the hit count value to trigger the break.
    The implicit value for break always is 0. For all other options, enter a number greater than 0.
    To keep track of the number of times a breakpoint is hit without ever breaking execution, set the hit count to a very high value.
  4. Click OK.
    The hit count is retained only for the debugging session. When the debugging session ends, the hit count is reset to zero.