Set Breakpoints (Compact 2013)
3/26/2014
You can set a breakpoint by using a source window, the New Breakpoint window, the Call Stack window, and the Disassembly window.
Note
When you set a breakpoint in source code, the color of the breakpoint glyph indicates the state of the breakpoint. If you set a breakpoint and its glyph is a hollow circle with a caution triangle, the breakpoint is not yet instantiated. When the module is loaded into memory, the breakpoint glyph will display as a solid red circle. For more information about breakpoint states, see Breakpoints.
To set a breakpoint by using a source window
In a source window, move the cursor to the line where you want execution to break. If the statement spans two or more lines, move the cursor to the last line of the statement.
Note
To set a breakpoint at the beginning of a function, position the cursor at the source code line that contains the opening brace of the function.
Right-click the source code line, click Breakpoint, and then click Toggle Breakpoint.
or
Click the line, and then press F9.
To set a breakpoint by using the New Breakpoint window
Go to the New Breakpoint window by using one of two methods:
- On the Debug menu, click New Breakpoint, and then click Break at Function.
- On the Debug menu, click Windows, click Breakpoints, and then click the New Breakpoint button, which is the leftmost button and shows a hand icon.
In the New Breakpoint window, on the Location tab, in the Break at box, add a breakpoint by typing the following syntax:
{,,modulename} function_name
You can create this syntax for EXEs and DLLs. For example:
{,,shell.exe} SHGetFileInfo {,,pm.dll} PlatformResumeSystem
Note
Be sure to use the exact syntax shown in this step, including the braces and the two commas.
Click OK.
To set a breakpoint by using the Call Stack window
When you are debugging and in break mode, on the Debug menu, click Windows, and then click Call Stack.
In the Call Stack window, right-click a line, and then click Insert/Remove Breakpoint.
A red circle appears in the left margin next to the function name, indicating that the breakpoint is set.
Note
The breakpoint is set at the next executable instruction in the function call.
To set a breakpoint by using the Disassembly window
When you are debugging and in break mode, on the Debug menu, click Windows, and then click Disassembly.
In the Disassembly window, right-click a line, and then click Toggle Breakpoint.
A red circle appears in the left margin next to the line, indicating that the breakpoint is set.
See Also
Concepts
Breakpoints
Kernel Debugger
Debugging