Microchip Technology MPLAB Starter Kit for PIC18F MCU DM180021 DM180021 User Manual

Product codes
DM180021
Page of 46
Developing an Application
© 2009 Microchip Technology Inc.
 
DS51852A-page 19
3.3.1
Editing Application Code
To view application code so that it may be edited, do one of the following:
• Select Edit>New to create new code or Edit>Open to search for and open an 
existing code file.
• Double-click on a file in the Project window to open an existing code file. See an 
example Project window in Figure 3-4. 
FIGURE 3-4:
EXAMPLE PROJECT
For more information on using the editor to create and edit code, see MPLAB IDE 
Editor Help.
3.3.2
Using Breakpoints and Mouseovers
To set a breakpoint in code, use one of the following methods:
• 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.
• Pop-up Menu: Place the cursor over the line of code where you want the break-
point. 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.
• Breakpoint Dialog: Open the Breakpoint dialog (Debugger>Breakpoints) to set, 
delete, enable or disable breakpoints. See MPLAB IDE Help for more information 
on this dialog.
A breakpoint set in code appears as a red “stop sign” with a “B”. Once code is halted, 
hovering over variables pops up the current value of those variables (Figure 3-5).
Note:
This feature must be set up. From the menu bar, select Edit>Properties
from the Properties dialog, select the Tooltips tab and then click the 
checkbox for “Enable Variable Mouseover Values”.