MPLAB X IDE generates debug macros for use with Microchip language tools. Macros passed to Microchip compilers and assemblers are shown below:
|__DEBUG||Specifies that this is a debug build.|
|__MPLAB_DEBUGGER_REAL_ICE||Specifies that the REAL ICE debug tool is in use.|
|__MPLAB_DEBUGGER_ICD3||Specifies that the ICD3 debug tool is in use.|
|__MPLAB_DEBUGGER_PK3||Specifies that the PICkit 3 debug tool is in use.|
|__MPLAB_DEBUGGER_PICKIT2||Specifies that the PICkit 2 debug tool is in use.|
|__MPLAB_DEBUGGER_PIC32MXSK||Specifies that the PIC32MX Starter Kit debug tool is in use.|
You may use these macros in your own code. For example:
Project Configurations and Debugging
A good use of project configurations is for creating your own debug configuration. Although MPLAB X IDE provides debug macros for use with Microchip tools, you may want to use your own debug macros or you may want to set up the same debug capabilities with third party tools.
The content on this page is being updated from a previous version. While the information above is now up to date, we will be adding some new content shortly to provide an in depth-example.