Watches Window

To open the Watches window, select Window>Debugging>Watches. You must be in debug mode to watch symbol values change.

Select global symbols and SFRs and watch values change on program halt or during runtime (if supported).

For information on using the Watches window, see Watch Symbol Values Change.

Watches Display

The following display features are discussed in the sections below: icons, columns and actions (buttons).

Icons

Icons are found to the left of the name object in the Name column:

Table 1. Name Column Icons
Icon Description
Watch object
Watch object in Program Memory
Static field of an object
Non-static field of an object

Columns

You can change the columns displayed in the window by:

Actions

Actions are on buttons on the left side of the window:

Table 2. Action Button Icons
Button Action
Toggle button:
  • Show verbose (qualified) names of member fields.
  • Show brief (relative) names of member fields.
Import watches from list file. Right click for options.
Export all watches to list file.
Set the default numeric format for the Value field.

Watches Menus

Right click in a blank area of a Watches window (not a row) to open a Watches window menu with basic functions.

Table 3. Watches Window Menu – Window
Menu Item Description
New Watch* Adds a new symbol to watch.
New Runtime Watch* MPLAB REAL ICE In-Circuit Emulator, Simulator Only.

Adds a new runtime watch for the selected symbol.

Export All Watches to List File Exports information about the symbols to be watched to a file (.xwatch).
Delete All Removes all the watched symbols from the Watches window.
* You can also right click in a symbol in code to add a New Watch or New Runtime Watch.

Right click on a row to open a Watches menu with additional functions that depend on whether a symbol is in the row or what debug tool you are using.

Table 4. Watches Window Menu – Row
Menu Item Description
New Watch Adds a new symbol to watch.
New Runtime Watch MPLAB REAL ICE In-Circuit Emulator Only.

Adds a new runtime watch for the selected symbol.

Run Time Update Interval MPLAB REAL ICE In-Circuit Emulator Only.

Specifies the rate at which the symbol value will be updated.

“No Delay” will update as quickly as your personal computer is able. If you are seeing errors in the runtime data, you can add a delay to decrease the update speed.

Export Selected Watches to List File Exports information about the symbol(s) to be watched to a file (.xwatch).

You can select more than one row using Shift click (select several rows in order) or Ctrl click (select several rows individually).

Export Data Exports watch data to a CSV file or as a literal string.
Delete Deletes selected symbol row(s) from the watch list.

You can also select a row and hit the <Delete> key.

Delete All Removes all the watched symbols from the Watches window.
Display Value Column as Displays the symbol value in the selected row in one of the formats listed. See also Fractional Integer Properties Dialog.
User Defined Size Specifies the size of the program memory symbol from the list.

Fractional Integer Properties Dialog

This dialog is intended to improve support for evaluating all fixed-point operation modes supported by dsPIC and PIC32 devices. View this dialog from the pop-up menu item Display Value Column as>Fractional Integer to select this feature and Display Value Column as>Fractional Properties optionally afterwards.

Table 5. Fractional Properties Dialog Items
Dialog Item Description
Variable The name of the variable, for reference.
N* The total number of bits available to represent the integer number.
Qm The whole part of the fixed data format.

‘m’ represents the number bits used to specify the whole part.

Qn The fractional part of the fixed data format.

‘n’ represents the number of bits used to specify the fractional part.

Signed* Check to use a bit to represent a signed value.
Slider Click and drag the slider to select the fixed point position (Qm vs. Qn) to be applied to the calculation of the fixed point fractional value.
* If the variable type is unknown, these items are made editable.
Figure 1. Fractional Properties Dialog