Watch Properties

Top  Previous  Next

You can display the Watch Properties Dialog by pressing the Watch Properties button in the Watches page of the Debugger. The Watch Properties Dialog lets you set various aspects of the way a Watch Variable is displayed. It also displays the underlying details of a variable. The Watch Properties Dialog is divided into two pages:

 

I. Page I: Display Format


The Display Format consists of  two main items. Here is a detailed description of each item:

 

1. Expression. This item shows the name of the target variable. If the variable is an array, it can also contain array subscripts. Each subscript can contain an integer expression that includes other variables that have been declared and are in scope.

 

You can change the expression any way you want by typing new names into the text box. The program also remembers recently entered variable names. You can access them by clicking on the down-arrow button at the right.

 

WatchPropDlg


2. Custom Format Options. The variable's value will be displayed in the Watch List using its declared data type. It is sometimes useful to display it in a different format. Enabling the Custom Format option lets you choose exactly how the variable is displayed. Here are the custom options:

 

A. Display As. This option lets you override the declared format and force the variable to be displayed in a different format. For example, you may have created a real array that actually contains integers. Selecting the Integer option would force the debugger to display the current value as an integer. Here is a  description of each option:

 

Integer. If this option is selected, the variable will be displayed as an integer no matter what the actual data type is. This is useful for doing things like examining the address where a real is stored.

 

Byte. If this option is selected, the variable is displayed as a byte, no matter what the actual data type is.

 

Char. If this option is selected, the variable is displayed as an ASCII character, no matter what the actual data type is.

 

String. If the String data type is selected, the variable will be displayed as a string no matter what the actual data type is. This includes reals, which could hold an integer, a pointer to a string or a real, depending on how they are used. It does not include one-dimensional "char" or "address" variables that can only hold single-byte values. One byte values are too small to hold a string pointer so they would never be used to hold a string. It does include two-dimensional "char" or "address" variables because the first dimension can hold a pointer to a string and the second dimension can be used to dereference the pointer.

 

Real. If this option is selected, the variable will be displayed as a real no matter what the actual data type is. This is useful for  instances where reals may be stored in complex data types.

 

B. Real Format. If the variable being watched is a real number, the value can be displayed in Fixed Point, Scientific and Engineering notation.

 

C. Digits. The Digits display controls how many digits past the decimal point are displayed for floating point numbers. For hex numbers, it controls the total number of hex nibbles displayed. If the hex number is bigger than the number of digits specified, the number of digits necessary to show the full number will be displayed.

 

D. Force Array. Because the debugger doesn't know if a variable is an array, you have to explicitly tell it if you want to display a variable as an array. To do this, enable the "Force Array" option.

 

When the option is enabled, you can set the number of dimensions and the size of each dimension.

 

Dims. The Dim value sets the number of dimensions in the array. The value can be between 1 and 10.

 

Dim Size. This is a list showing all the  dimension in the array. The number of items increases or decrease as the number of Dims changes. Each item specifies the size of the dimension. Changing the values changes the way the array is displayed in the Watch List and in the Expanded Variable Display.

ForceArray

 

3. Integer Display Format. The Integer Display Format options (lower left) control the display of any integer numbers. Integers can be displayed in decimal, hexadecimal, octal and binary formats.

 

The debugger allows the same variable to be entered in the list multiple times. This lets you display the same variable in different ways. For example, the string variable to the right is displayed in seven different ways. The first item shows the string's address. The second item shows it as a string. The third item shows it as a hex integer. The fourth as a hex byte. The fifth, sixth and seventh are shown as individual characters for the first three elements of the array.

FormatedDisplay

II. Page II. Watch Variable Properties


This page displays all relevant properties of the Watch variables.

 

Variable. This is the name of the variable as used in the source code.

 

Type. This is the data type of the variable, which in XPL is generally confined to integer, real, char and segment variables.

 

Procedure. This is the name of the procedure where the variable was defined.

 

Level and Offset. Each level of subroutine nesting has its own set of local variables. The Level value specifies the nesting depth of the variable. The Offset value specifies how far the variable is from the beginning of the local variable store.

 

Scope. This specifies the range of I2L Program Counter values in which the variable is visible.

 

WatchProperties2