Starting and Stopping Debugging

To debug an application in MPLAB® X IDE, you must create a project that contains your source code so that the code may be built, programmed into your device, and executed as specified below:

  • To run your code, select either Debug>Debug Main Project or 'Debug Main Project' from the Run toolbar.
  • To halt your code, select either Debug>Pause or 'Pause' from the Debug toolbar.
  • To run your code again, select either Debug>Continue or 'Continue' from the Debug toolbar.
  • To step through your code, select either Debug>Step Into or 'Step Into' from the Debug toolbar. Be careful not to step into a Sleep instruction or you will have to perform a processor Reset to resume emulation.
  • To step over a line of code, select either Debug>Step Over or 'Step Over' from the Debug toolbar.
  • To end code execution, select either Debug>Finish Debugger Session or 'Finish Debugger Session' from the Debug toolbar.
  • To perform a processor Reset on your code, select either Debug>Reset or 'Reset' from the Debug toolbar. Additional Resets, such as POR/BOR, MCLR, and System, may be available, depending on the device.
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.