Поделиться через


Handling Breakpoint Behavior (Windows Embedded CE 6.0)

1/5/2010

You must have a solution open before you can set a breakpoint. If no solution is open, the Debug menu does not appear on the menu bar. The Breakpoints window can be accessed only by choosing the Windows option on the Debug menu.

You can create or manage breakpoints in several different ways.

  • Breakpoints List window
    You can use the Breakpoints List window to set, remove, enable, or disable a breakpoint, to edit breakpoint properties, or to edit a breakpoint in source code.
    For more information, see Breakpoints List Window.
  • New Breakpoint dialog box
    You can use the New Breakpoint dialog box to set location, data, or message type breakpoints. From the Location tab in this dialog box, you can set a breakpoint by location. You can also include conditional parameters to use, and designate whether the breakpoint is a software breakpoint, or a hardware-assisted breakpoint.
    From the Data tab on this dialog, you can enter an expression that determines whether the debugger stops at the breakpoint.
    From the Messages tab, you can set a breakpoint that occurs when a specific message is encountered in the source code.
    For more information, see New Breakpoint Dialog Box.
  • Call Stack window
    You can set, remove, enable, or disable a breakpoint in the Call Stack window by selecting Insert/Remove Breakpoint.
    For more information, see Call Stack Window.
  • Disassembly window
    You can set, remove, enable, or disable a breakpoint in disassembly or source code in the Disassembly window by selecting Insert/Remove Breakpoint.
    For more information, see Disassembly Window.

Breakpoint instantiation

If you set a breakpoint and the debugger can instantiate the breakpoint, a red breakpoint glyph appears in the margin at the left of the code. For more information about breakpoint glyphs, see Breakpoint Overview.

If you set a breakpoint while the debugger is running, then the debugger cannot instantiate the breakpoint until code execution halts. If a breakpoint is cannot be instantiated, a pink breakpoint glyph appears in the margin at the left of the code, indicating an un-instantiated breakpoint. At the next stopping event, the debugger will attempt to instantiate the breakpoint.

The two most common reasons that the debugger cannot instantiate a breakpoint are:

  • The code where the breakpoint is set has not yet been loaded.
  • The source path mapping is incorrect.

Note

Avoid setting a breakpoint in a line with a NOP. If you set a breakpoint at a line with a NOP instruction in the Disassembly window, a warning message will display. If you continue, an error occurs. For example, a NOP in the delay slot, after a branch instruction on MIPS processors, produces an error.

See Also

Concepts

Breakpoints
Setting and Removing Breakpoints