User`s guide
MPLAB
®
IDE User’s Guide
DS51519B-page 84 © 2006 Microchip Technology Inc.
6.3.9 Watch Window and Associated Dialogs
The following MPLAB IDE windows and dialogs are associated with Watches:
• Section 12.14 “Watch Window”
• Section 13.3 “Add Watch Dialog”
• Section 13.27 “Table Setup Dialog”
• Section 13.30 “Watch/Locals Dialog”
6.4 BREAKPOINTS
Breakpoints allow you to specify conditional program halts so that you may observe
memory, register or variable values after a run-time execution. You may set breakpoints
in either the file (editor) window, the program memory window or the disassembly
window.
6.4.1 Breakpoint Setup
There are several ways to set up breakpoints:
1. Double Click in Gutter – Double click in the window gutter next to the line of
code where you want the breakpoint. Double click again to remove the
breakpoint.
2. Pop-up Menu – Place the cursor over the line of code where you want the
breakpoint. Then, right click to pop up a menu and select Set Breakpoint. Once
a breakpoint is set, Set Breakpoint will become Remove Breakpoint and Disable
breakpoint. Other options on the pop-up menu under Breakpoints are for
deleting, enabling or disabling all breakpoints.
3. Breakpoint Dialog – Open the Breakpoint dialog (Debugger>Breakpoints
) to
set, delete, enable or disable breakpoints. You must select a debug tool before
this option is available.
6.4.2 Breakpoint Symbols
Symbols relating to breakpoint operation are displayed in the gutter of each supported
window. For information on these symbols, see Section 12.3 “Code Display Window
Symbols”.
6.4.3 Breakpoints in Code
Breakpoints will auto-adjust when source code is modified. This means:
• Breakpoints set on addresses will stay with those addresses, regardless of the
code associated with that address.
• Breakpoints set on source code lines will move with those lines of code.
When setting breakpoints in C code, care must be taken if switching between the C
code listing and the associated assembly listing when debugging.
• When you set a breakpoint on a line of C code, a breakpoint is set at the first
corresponding line of assembly code as well. Both listing displays will show a red
breakpoint symbol at the corresponding line of code.
• When you set a breakpoint in the assembly listing on any line of assembly code
that represents a single line of C code, a red breakpoint symbol will appear next to
the assembly code line and a yellow breakpoint symbol will appear next to the line
of C code.