Creating a Conditional Breakpoint | Breakpoints Window |
An option is an additional restriction placed on a breakpoint. The simplest option tests for a condition after the program arrives at a breakpoint.
To apply an option to a breakpoint:
None | No option set. |
If | Stop program execution only if the condition evaluates to nonzero when the event occurs. |
While in | Stop program execution only if the event occurs while within the scope of a specified function, or within any function called from the specified function. |
Thread | Stop program execution if the thread that caused the event matches the specified thread ID. |
Count | Stop program execution when the breakpoint is reached a specified number of times. For example, if you have set a breakpoint in a loop and you want to stop program execution on the fifteenth iteration of the loop, set Count to 14. |
CUSTOM | Use this option if you want to put two or more options on a breakpoint. Enter the options as if you were typing them in the <computer>dbx<\computer> command line. See <xref events> for more information. |
Note - Use If on location-type breakpoints; the associated breakpoint only triggers if the condition is true.
Note - Use the While In option on non-location type breakpoints. The While In option accepts a function name, so the associated breakpoint (for example, an In Class or On Exception breakpoint) activates when it gets to that function and deactivates when it leaves the function.