Breakpoint Hit Count Dialog Box
The Breakpoint Hit Count dialog box opens when you choose the Hit Count button from the New Breakpoint dialog box or the Breakpoint Properties dialog box.
The Breakpoint Hit Count dialog box enables you to specify a hit count property for a breakpoint. A breakpoint without a hit count causes program execution to break each time the breakpoint is hit. A breakpoint with a hit count property causes execution to break only on the specified number of hits.
To set or modify a hit count property, use the following controls:
- When the breakpoint is hit
- This setting determines how the breakpoint should behave when it is hit. You can choose to:
- Break always, regardless of hit count. This is the default option. This option has the least effect on program performance, since the debugger does not actually bother to compare the values.
- Break when the hit count is equal to the counter.
- Break when the hit count is a multiple of the counter.
- Break when the hit count is greater than or equal to the counter.
If you choose any option other than the default, an edit box appears next to the When the breakpoint is hit list control. Edit the value in this edit box to set the hit count value. For example, you might choose break when hit count is equal to and enter 12. This causes execution to stop the 12th time the breakpoint is hit, not on any other hit.
- Current hit count
- This value shows the number of times the breakpoint has been hit. The debugger keeps track of this value, if you have chosen a setting other than the break always default for When the breakpoint is hit. You can open the Breakpoint Properties dialog box and choose Hit Count to view the current hit count while your program is executing. If you want to break every time the breakpoint is hit, but you also want to keep track of the hit count in the dialog box, choose break when the hit count is a multiple of and set the count to 1.
- Reset hit count
- This button resets the value shown for the Current hit count to 0.