User manual

MPLAB
®
ICD 3 IN-CIRCUIT
DEBUGGER USERS GUIDE
© 2008 Microchip Technology Inc. DS51766A-page 63
Chapter 8. Basic Debug Functions
8.1 INTRODUCTION
Basic MPLAB ICD 3 in-circuit debugger debug functions of breakpoints and stopwatch
are discussed.
8.2 BREAKPOINTS
Use breakpoints to halt code execution at specified lines in your code.
Breakpoints and triggers use the same resources. Therefore, the available number of
breakpoints is actually the available number of combined breakpoints/triggers.
To select hardware or software breakpoints:
1. Select Debugger>Settings
and click the Configuration tab.
2. Select the desired type of breakpoints for your application. A list of features for
each breakpoint type, hardware or software, is shown under that type. (See
Section 9.5.2 “Settings Dialog, Configuration Tab” for more information.)
8.3 STOPWATCH
Use the stopwatch with breakpoints to time code execution.
To set a breakpoint in code, do one of the following:
Double click or right click on a line of code to set up an individual breakpoint.
•Select Debugger>Breakpoints
to open the Breakpoints dialog and set up multiple
breakpoints and breakpoint conditions. See Section 9.3.1 “Breakpoints Dialog”
for more information.
To determine the time between the breakpoints, use the stopwatch:
1. Open the Breakpoints dialog (Debugger>Breakpoints
).
1. Click Stopwatch on the Breakpoints dialog to open the Stopwatch dialog.
2. Under “Start Condition”, select a breakpoint from the drop-down list. Also decide
if “Start condition will cause the target device to halt”.
3. Under “Stop Condition”, select another breakpoint from the drop-down list. Also
decide if “Stop condition will cause the target device to halt”.
4. Decide if there will be a “Reset stopwatch on run”.
5. Click OK.
Note: Using software breakpoints for debug impacts device endurance.
Therefore, it is recommended that devices used in this manner not be
used as production parts.