Debug Mode: A device programmed in debug mode is not capable of independent operation. It's operation depends on an active connection through a debug tool to MPLAB X which can fully control the device. Devices programmed in debug mode will use slightly more memory and other resources than a device programmed in release mode in order to accommodate the background debug code that facilitates communications and control with MPLAB X. A special linker script is automatically selected by MPLAB X which will reserve any memory locations required by the background debug code. User intervention in this process is not normally required.
The build process in MPLAB® X is a little different from other development environments. It is not necessary to explicitly choose a "Debug" mode when performing a debug build. Instead, there is a separate button on the toolbar that encapsulates several functions that must be performed in order to build and run your application in the simulator or on a target board.
The Debug Project button performs the following tasks:
- Build (make) the project in debug mode.
- If there are no build errors and you are working with hardware, your application is programmed into the target device using the debug tool selected in the project options.
- The target device is released from reset and your code begins running unless you have selected a different option in the Embedded Generic Settings section of the Tools Options dialog.