Starting and Stopping A Debug Session

Starting a Debug Session

After ensuring the desired debug startup option has been set and ensuring the appropriate programmer/debugger has been chosen, a Debug Session can be started by clicking on the Main_Debug_Project.png Debug Project Icon.

Four things will happen when a debug session has been initiated:

  1. The project will build
  2. MPLAB® X IDE will connect to the selected debug tool and download the built image
  3. The Debug Icons will appear on the Toolbar
  4. The application in the PIC® MCU will run according to the debug startup option
screenshot.png

An illustration of MPLAB X IDE's user interface immediately after a debug session has been started. This example shows the operation when the Debug Startup option is set to MAIN.

When the program being debugged is not running, the location of the Program Counter is shown on the screen with a green line.

Finishing a Debug Session

To end a debug session, click on the Finish Debugger Session button Debug_Finish_Debugger_Session.png. This will immediately stop the program and will also close all debugging windows previously open (Watches, Variables, Call Stack, etc.).
© 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.