User manual

Tutorial
© 2008 Microchip Technology Inc. DS51766A-page 41
5.11.2 Setting a Single Hardware Breakpoint
To set a single breakpoint:
1. Select Debugger>Reset>Processor Reset (or click the Reset toolbar button) to
reset the example program.
2. Highlight or place the cursor on the following line of code from counter.c:
counter++; //increment counter
3. Double click on the line, or right click on the line and then select Set Breakpoint
from the shortcut menu. This line is now marked as a breakpoint (B in red stop
sign) as shown in Figure 5-11.
FIGURE 5-11: SET BREAKPOINT
4. Select Debugger>Run
(or click the Run toolbar button) to run the program once
again in Real-Time mode. The program will halt at the line marked by the
breakpoint, but now there will be a green arrow over the breakpoint symbol.
FIGURE 5-12: PROGRAM HALTED