Runtime Watches
Last modified by Microchip on 2023/12/20 18:59
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:
- Right-click on the project name and select Properties.
- Click on the debug tool name (e.g., Real ICE) and select Clock.
- 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. 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. 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.