How to: Specify a Data Breakpoint Hit Count

Hit count

The number of times the value stored in the specified memory location is accessed (read/write).

To specify a hit count

To specify or edit the Hit Count property, you must open the Hit Count Dialog Box.

In Data Breakpoints window, select a breakpoint row, and then choose Hit Count on the context menu.

Figure 1. Hit Count Dialog Box

To set or modify a hit count property, use the following controls:

If you choose any option other than the default in When the breakpoint is hit list control, an edit box appears next to it. 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 5. This causes execution to stop the 5th time the breakpoint is hit, not on any other hit.