Viewing variables in the EGL debugger

This topic shows you how to view variables in your program while your are debugging your programs.

Prerequisites

Variables and breakpoints

When you are debugging a program, you will probably have the debugger stop or pause at certain points in your program (see Using breakpoints in the EGL debugger for more information on using breakpoints to make the debugger pause while debugging your program). Whenever a program is paused, you can view the current values of the variables in the program.

Filtering variables

You can display only those variables that match certain criteria. You can select variables to be excluded by name, or by characteristics of the variable.

If you exclude variables by name, you can use the following wildcard characters:
?
Matches any single character
*
Matches zero or more characters
If you exclude variables by characteristic, you can exclude any of the following:
  • Variables that currently have a null value
  • Build descriptor options
  • EGL system variables

Displaying and changing values

You typically use the Variable view to monitor the changing values of your variables. To display their values, do one of the following:
  • Click the Options button at the top of the view (the triangle), and then click Layout and either Horizontal View or Vertical View. Also on the Options menu, choose Detail pane. The Variables view will split into two panes, one showing the current value of the variable.
  • Click the Options button at the top of the view (the triangle), then click Layout > Show Columns. If you do not see the Value column, choose Layout > Show Columns > Value.
  • In the Source view of the Debug perspective, hover over the variable name to display the current value.

To change a value, right-click the value and choose the appropriate option from the pop-up menu. The wording of the option varies depending on the context.

For more information, see "Buttons in the Variables view" in this topic.

Buttons in the Variables view

In the Variables view, expand the parts in the navigator to see the variables that are associated with them.

Depending on your options as described below, there is also a Detail pane that displays the details of a highlighted variable. You can type a value for the variable in this pane, highlight that value, right-click, and click Assign Value to assign the value to the variable.

The Variables view provides the following buttons:
Show Type Names
This toggle displays or hides the types on which the variables are based. This button is not available if you chose to show columns. In that case, you can request a column that shows the variable type.
Collapse All
This hides all the variable names and shows only the parts in the current program.
[Options]
Click this downward pointing triangle icon to display a list of further options:
Layout
The following layout options are available for the Variables view:
Vertical View Orientation
The detail pane is displayed below the variables.
Horizontal View Orientation
The detail pane is displayed to the right of the variables.
Variables View Only
This option closes the detail pane.
Show Columns
This option reformats the view in table form
Select Columns
This option is only available if you select Show Columns. The following columns are available:
Name
The name of the variable.
Declared Type
The original type of the variable.
Value
The current value of the variable. Click this cell to enter a new value for the variable, or right-click and choose Change Value to display a window where you can change the value.
Actual Type
The actual type will differ from the declared type only when the variable was originally ANY type and took on another type through assignment.
EGL
The following options are available for variables in an EGL program:
Sort
You can sort the variables in the view according to the following criteria:
by order
The order in which the variables are declared in the program
by name ascending
Ascending alphabetic order
by name descending
Descending alphabetic order
Group implicit fields
Use this option to group implicit fields (such as message and messageID for exceptions) under the heading "<implicit fields...>" in the variables display.
Filters
You can exclude variables on the basis of name or characteristics; see "Filtering variables" in this topic.
The following options do not apply to debugging in EGL:
  • Create Watch Expression
  • Show Logical Structure
  • Show All Jython Variables

Compatibility

Table 1. Compatibility considerations for viewing variables
Platform Issue
Rich UI Hot swapping is not supported. Similarly, the EGL debugger does not respond to changes made to variable values in the Variables view.

Feedback