Runtime Watches

Note: This feature is only supported on the MPLAB® REAL ICE in-circuit emulator.

In the MPLAB® X IDE Watches window (Window>Debugging>Watches ), you can create a watch for a symbol where the value changes at runtime.

Before you add a runtime watch to the Watches window, you need to set up the clock:

  1. Right click on the project name and select “Properties”.
  2. Click on the debug tool name (e.g., Real ICE) and select the option category “Clock”.
  3. Set the runtime instruction speed.

To add a global symbol or SFR as a runtime watch, do one of the following:

  • Right click in the Watches window and select “New Runtime Watch” or select Debug>New Runtime Watch. Click the selection buttons to see either Global Symbols or SFRs. Click on a name from the list and then click OK.
  • Select the symbol or SFR name in the Editor window and then select “New Runtime Watch” from the right click menu. The name will be populated in the Watches window. Click OK.

Debug Run and watch the values change as the program executes.

For all devices except PIC32 MCUs, symbols used in a runtime watch must be sized to match the device memory. That is, you need 8-bit symbols when using an 8-bit device.

For more information on the Watches window, see MPLAB® X IDE documentation.

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