1.5 Programming and Debugging Microcontrollers

The MPLAB X IDE supports Microchip various programming and debugging tools, which can be referenced from the device-support documents listed in the section References.

The user can start debugging session in the MPLAB X IDE by choosing any one of these options:

  • From the toolbar, click (the Debug Project icon).
  • Choose the Debug Main Project from the drop-down menu:
    Figure 1-1. Debug Main Project
Note: If multiple projects are opened in the MPLAB X IDE, the one which is set as the main project will be targeted for the debug session.

During the debugging session, the following basic and advanced features required for debugging are available in the MPLAB X IDE:

  • Step Into, Step Over, Step Out, Run to cursor
  • Setting breakpoints
  • Hold in reset, Run
  • Viewing a variable in Watch window
  • Device peripheral register content in I/O view
  • Device’s memory content in Memory view
  • The Disassembly view of the code when instruction level debugging is needed
Note: Simulator support is available for few devices. Refer to the device support document for additional information, which are listed in the section References.