Skip to content

Viewing and Modifying Variables

Global Variables Window

The Global Variables window is accessed from the Debug Menu by selecting Windows and choosing Globals, or from the Debug toolbar. It displays all global variables in the program and lets you modify their values.

The Global Variables Window is only enabled and up to date when the program is in break mode. As you step through the program, the window is automatically updated to reflect changes.

Local Variables Window

The Local Variables window is accessed from the Debug menu by selecting Windows and choosing Locals, or from the Debug toolbar. It displays all local variables of the selected method context and lets you modify their values.

The method context is defined by the selected call stack entry in the Call Stack Window. Activating a different call stack entry in the Call Stack window also updates the Local Variables Window with the variables of the selected method context.

The Local Variables Window is only enabled and up to date when the program is in break mode. As you step through the program, the window is automatically updated to reflect changes.

Viewing Variables in the Code Editor

Local and global variable values can be quickly viewed by hovering the mouse cursor over the variable name in the procedure or function that defines it. If the variable is in scope and the program is in break mode, its value will be displayed in a tooltip window.

Modifying Variables

You can modify the value of variables when the program is in break mode. To modify the value of a variable:

  1. Select the variable in the Local/Global Variables Window.
  2. Click in the corresponding Value column.
  3. Type the new value and press Enter.

You can modify the value of most variable types, except for RowID and Variant variables. Variables of String type can be fully modified, including their size, when in normal break mode. While in limited break mode, only the individual characters of String variables can be modified.

Variables, but no other types of expressions, may also be modified in the Watches window.

Struct and Array Variables

Struct and Array variables are displayed in a hierarchical fashion in the Local/Global Variables Window. You can expand or collapse the struct members and the array elements.

Object Variables

Variables that store object handles are displayed as integers by default (DataFlex does not have a distinct object handle type). The exception is the global variable Self.

The Global and Local Variables window context menu allows you to select any variable and choose to display it as an object. If the value contained in the variable corresponds to an object handle in your application, then the variable shows a hierarchy of information about the object. You can expand or collapse the tree nodes to reveal the object tree that surrounds the object.

String Values Displayed in Quotes

Variables containing string values are displayed within quotes to make it easier to see leading and trailing whitespace characters. When editing or modifying string variables, the quotes are not displayed and do not need to be specified.

The debugger shows the Unicode replacement character (�) for UChar characters in strings and UChar arrays outside the ASCII range (>127), because in UTF-8, these are multi-byte characters and a UChar is a single byte.

See Also