Discrete Debugger Operations
MPLAB® X IDE has a Debug Project command Main_Debug_Project.png that:
  • Builds the project and includes the debug executive.
  • Programs the device.
  • Starts the debug session (runs the program).

But what if we don't want to do all three together? Discrete Debugging allows us to perform debug operations one step at a time (i.e, discretely):

BuildForDebugging.gif Build for Debugging

  • Builds project with debug executive.
  • Does NOT program or run target.

ProgramDevice.gif Program Device for Debugging

  • Programs target with debug build.
  • Does NOT build project or run target.

LaunchDebugger.gif Launch Debugger

  • Starts debug session.
  • Does NOT build project or program target.

How is this useful?

One useful application for Discrete Debugger Operations is experimenting with configuration bit settings without actually changing code.



Build for Debugging

When we click on BuildForDebugging.gif, the configuration bit settings are picked up from directives in the source code.


Modify Configuration Bit Settings

Once the project has been built for debugging, we can go into our Configuration Bits window (Menu > Window > PIC Memory Views > Configuration Bits) and change a few of the settings or just one in particular.


Program Device for Debug

Now when we click on ProgramDevice.gif, the Configuration Bits window settings we just changed are the ones used when programming the device.


Launch Debugger

The device will run with the new settings from the Configuration Bits window.

The next build (of any kind) will restore the Configuration Bit settings to what was originally being used from the directives in the source code.

© 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.