
148
|
Chapter 5, Debugging
#36 Set Breakpoints
HACK
If you specify a break condition, whenever the debugger reaches the break-
point, it evaluates the condition, and if the condition is met, the program
enters break mode. If, however, the condition is not met, then the pro-
gram continues execution. The break condition specified can be any valid
debugger expression, which may include the relational operators
<, >, ==,
!=, and so on, along with many nonrelational operators, including +, -, &&,
||, and so on. Variables as well as object properties can be used in expres-
sions. For a complete list of valid debugger expressions, refer to:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/
html/vchowusingexpressionsindebugger.asp
Finally, the breakpoint condition can be configured so that the program
enters break mode when the condition is true or when the condition has
changed.
Control How Often to Break on a Breakpoint
Breakpoints, by default, cause the program to enter break mode whenever
they are hit and their condition, if any, is met. However, you can configure a
breakpoint to enter break mode based on the breakpoint’s hit count. The hit
count of a breakpoint is the number of times the breakpoint has been
reached and the condition, if specified, has been met. Through the Break-
point Properties dialog box, you can indicate when a breakpoint should
cause the program to enter break ...