General Debug Limitations

General Debug Limitations are limitations that apply to devices for the debug function.

  • The debugger/emulator uses several on-chip resources when debugging. Refer to the reserved resources section of this help file.
  • The debugger/emulator has different debug features available, depending on the selected device.
  • Depending on the debugger/emulator, there are issues with Freeze on Halt support as well as other device debug issues.
  • If you modify Program Memory, you must reprogram the device in order to program the changes into the target.
  • The Reset command resets the program, goes to the zero location, and halts. The program does not automatically rerun.
  • User ID memory cannot be changed when in Debug mode.
  • 16-bit timer high byte overwritten. For 8-bit devices: Whenever TMR0L is read, the TMR0H latch is updated with what is in the internal timer. When TMR0L is in an MPLAB X IDE window (e.g., Watch window) and you step or halt your code, TMR0L is read to update that window, causing an update to TMR0H from the internal timer.
  • MPLAB X IDE Read limitation for buffers. When MPLAB X IDE reads a transmit or receive buffer, such as the UART module UxRXREG register, it may corrupt the data. To avoid this condition, do not set a breakpoint or step through code that reads these buffers. Also, avoid setting a Watch on these buffers. To read a receive buffer, move the data into another register and read that register.
  • The clock speed in the status bar is not relevant. Clock speed is set by the target oscillator; it is not controlled or measured by MPLAB X IDE.
  • If you attempt to single step over an invalid two-word instruction, the Program Counter moves to the 2A location.
  • Some devices have a BF, RCIF and PORTB issue. A workaround for the BF, RCIF and PORTB issue would be to not have SSPBUF, RCREG or PORTB in an open Watch or File Register window.
  • LVP disabled for debugging. Low-voltage ICSP programming is disabled for devices that support this type of programming. The emulator/debugger does not support Low Voltage Programming (LVP) and will disable this function. You cannot enable it through programming using the debugger. However, you can enable it through a dedicated programmer, such as MPLAB PM3.
  • Flash memory windows need to be read on change. When a Flash memory value changes or the processor is halted, the data in that memory window (e.g., Program Memory window) is not updated; you must do a Read of device memory.


Software breakpoints may not be available on all debuggers/emulators. Check the specific tool’s user’s guide for breakpoint information.

  • Breakpoints set in code protected segments do not halt the processor.
  • Software breakpoints and POR. If a POR occurs and software breakpoints are turned on, you must reprogram your target before continuing. Failure to do so may cause spurious halts.
  • Limited hardware breakpoints available. Only a certain amount of breakpoints are available when using the debuggers/emulators. The actual number varies depending on the selected device. View the Device Debug Resource toolbar for information on the number of available and used breakpoints. See MPLAB X IDE Help for more information on the toolbar.
    For 8- and 16-bit devices, breakpoints, data captures, and runtime watches use the same resources. Therefore, setting a data capture or runtime watch uses the resource for the selected symbol.
    As a general rule:
Devices Number of Hardware Breakpoints
PIC12F/16F/16F1xxx devices 1
PIC16F1xxx enhanced devices 1 to 3 (Note 1)
PIC18F devices 1
PIC18F enhanced devices 3
PIC18FxxJ devices 3 or 5 (Note 2)
PIC18FxxJ devices 3 or 5 (Note 2)
dsPIC30F devices 2
dsPIC33F/PIC24 devices 4
PIC32MX devices 6
Note 1: Refer to the Development Tools Selector (DTS) on to select your device and determine the number of available breakpoints for the device and its related processor extension pack or debug header.
Note 2: There is a limitation for these devices that only one data capture is available.
  • Hardware breakpoint skidding may occur on Halt. Hardware breakpoints may skid on Halt (not Halt on the instruction where the breakpoint is located) based on device and type of memory on which they are set, as described below:
Device Family No. of Instructions Skid*
Program Memory Data Memory
PIC12F/16F/18F MCUs 1 2
PIC12F1XXX/16F1XXX 0 0
PIC24 MCUs and dsPIC DSCs 2 2
PIC32MX MCUs 0 0
* Using single stepping to reach a breakpoint will not produce a skid.

Data Capture, Runtime Watches, and Trace (EM)

Not all devices support data capture, runtime watches and/or trace. See the Development Tools Selector (DTS) on the Microchip website for more information on features supported on your device.

Trace may not be available on all debuggers/emulators. Check the specific tool’s user’s guide for trace information.

  • Clock switching is available for data capture and trace, but you must set the clock correctly on the Clock tab of the Setting dialog or you may see issues.

8- and 16-bit Devices

  • In-line assembly code (assembly code within C code) cannot be traced.
  • Native trace and data capture/runtime watches cannot be used together.
  • For native trace at speeds higher than 15 MIPS, the Performance Pack may be needed. The actual cutoff speed may vary depending on layout, noise, and similar considerations.
  • When trace overflows, you may get the message in the Output window:
    “Unrecognized streaming data header, xx received”
    and trace data may not be valid.

32-bit Devices

  • Trace can be used with either data capture/runtime watches or Application In/Out, but not both. You can, however, use both data capture/runtime watches and Application In/Out.
© 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.