User`s guide
Walk-Through and Detailed Tutorial
© 2006 Microchip Technology Inc. DS51519B-page 57
The file register address of the symbols is listed first, followed by the symbol name and
finally the value of the symbol.
For more on Watch windows, see Section 6.3 “Watch Window”.
Tutorial Step 16:
You will first set up the Watch window:
• Select COUNT from the symbol selection box at the top of the window. Click Add
Symbol to add it to the Watch window list. If you want to quickly advance through
the list, start typing COUNT after selecting the pull down icon.
• Select WREG from the SFR selection box at the top of the window. Click Add
SFR to add it to the Watch window list. If you want to quickly advance through the
list, start typing WREG after selecting the pull down icon.
• Select PORTC from the SFR selection box at the top of the window. Click Add
SFR to add it to the Watch window list. If you want to quickly advance through the
list, start typing PORTC after selecting the pull down icon.
You should now have these symbols in the Watch window. Next, you will run your code
and watch the symbol values change as you step through the program.
•Select Debugger>Reset>Processor Reset
to reset your application.
•Select Debugger>Step Into
(or click the equivalent toolbar icon) until you have
stepped to the following program line:
incf COUNT,F ;increment count
• Step one more time to see the value of COUNT in the Watch window change from
00 to 01.
• Step one more time to see the value of WREG in the Watch window change from
00 to 01.
• Step one more time to see the value of PORTC in the Watch window change from
00 to 01.
3.18 USING BREAKPOINTS
Breakpoints are useful for conditionally halting the execution of your program in either
the file (editor) window, the program memory window or the disassembly window. Sin-
gle breakpoints may be set by double clicking on a line of code, or right clicking on the
line and selecting Set Breakpoint from the pop-up menu. Multiple breakpoints may be
set using the Breakpoint dialog (Debugger>Breakpoints
). The number of breakpoints
available will vary by debug tool and will be shown on the Breakpoint dialog.
For more on breakpoints, see Section 6.4 “Breakpoints”.
Tutorial Step 17:
To run your program again using a breakpoint:
•Select Debugger>Reset>Processor Reset
to reset your application.
• Set a breakpoint by double clicking in the gutter next to the following line of code:
incf COUNT,F ;increment count
•Select Debugger>Run
to run your program. Program execution should stop at the
breakpoint. The values for all items in the Watch window should be 0x00. You may
step through your code from this point to watch the values in the Watch window
change again.
This concludes the tutorial. If you have a programmer and wish to program this code
into a device, follow the instructions in the next two sections.
Note: The values in the Watch window are in color if they were changed by the
previous debug operation, and are black if they were not changed by the
previous debug operation.