To inspect the value of a variable point the simplest way is just to hold the mouse cursor over it to invoke a tooltip. We can also put the mouse cursor on it in the debug window and click the right mouse button to bring up a context menu. This has an Evaluation option and a Display Variable option.
The workbench also provides 3 windows that allow us to view variables.
If you chose Evaluate, by just clicking again or by pressing RETURN, the variable name will be copied to the Evaluate Window and a LIST DIM style operation executed upon it.
For strings and string array elements the strings will be displayed as quoted strings if printable or in HEX() otherwise. Characters above HEX(80) are not considered printable unless byte 50 of $OPTIONS RUN is set to indicate a non-English locale.
We can call up a more detailed context sensitive display. This is done by pressing CTRL-F2 with the cursor under the variable, or by right clicking the variable to get a context menu and picking the display variable option. This can be very useful when you need a more detailed look at the more complex data types. It will for example allow you to see each unpacked FLD value from a DEFRECORD.
Depending on the variable type the window displayed can differ.
String | Large variable dialog. - Displays a BYTE view of the string. |
---|---|
Numeric | Inspect variable window - Display will be identical to Current/Local variable windows. |
DEFRECORD | HTML display - A persistent version of the DEFRECORD tooltip. |
Handle | HTML display - A persistent version of the handle tooltip. |
SYM | Inspect variable window - Display will be identical to Current/Local variable windows. |
Xerces DOM Object | Inspect variable window - XML Tree display. |
Client-Side COM Object | HTML display - Method list. |