Share via


Breakpoint Conditions (Windows Embedded CE 6.0)

1/5/2010

A break condition is an expression that gets evaluated when the breakpoint is reached. The result of the evaluation determines whether the breakpoint is hit. If the breakpoint is hit and the hit count is correct, the debugger breaks execution.

The condition can be any valid expression recognized by the debugger.

The kernel debugger includes a native expression evaluator that evaluates expressions you enter in the QuickWatch dialog box, in the Watch window, or in the Breakpoints window.

Differences from standard C/C++

The debugger accepts most Microsoft and ANSI C/C++ expressions. However, the following list shows differences you might need to be aware of:

  • Unsupported Operators
    Debugger expressions do not support comma (,) or question mark (?) operators.
  • Additional Supported Operators
    Debugger expressions support the context operator ({ }) to specify the context of a symbol, and memory operators (BY, WO, and DW) to access memory.
    Memory operators have the lowest precedence of any operator. The memory operators are useful mainly in debugging assembly-language code.

Restrictions on C/C++ Expressions

  • A debugger expression cannot call an intrinsic or inlined function unless the function appears at least once as a normal function.
  • Debugger expressions limit pointer type cases to one level of indirection. You can use (char *)sym, for example, but not (char **)sym or char far *( far *).
  • If you cast to a type, the type must be known to the debugger. You must have another object of that type in your program. Types created using typedef statements are not supported.
  • In debugger expressions, the C++ scope operator (::) has lower precedence than it does in source code. In C++ source code, this operator has the highest precedence. In the debugger, its precedence falls between the base and postfix operators (->, ++, --) and the unary operators (!, &, *, and others).

For additional information about restrictions on expressions that can be evaluated by the debugger, see the MSDN Library, Expressions in the Debugger.

See Also

Reference

New Breakpoint Dialog Box: Breakpoint Condition Dialog Box
New Breakpoint Dialog Box

Concepts

Breakpoints