Variables and Call Stack Window

To view this window, select Window»Variables and Call Stack in the active LabWindows/CVI window.

Call Stack

The Call Stack section of this window shows the current call stack of functions in the program, displaying the most recently called function at the top and the initial function at the bottom of the list. Double-click a function in the list to view the last statement that your program executed in that function.

LabWindows/CVI displays functions in the Call Stack only during a breakpoint state.


Use the Variables and Call Stack window to inspect and modify the values of currently defined program variables. The Variables section of the window shows the names and types of all currently declared variables, including arrays and strings. LabWindows/CVI also displays the current values of numeric scalars, values and contents of pointers, and string contents. LabWindows/CVI displays variables in the Variables and Call Stack window when you are debugging a program.

LabWindows/CVI updates variables in this window at each breakpoint. Values in red text indicate that the variable value changed from the last time the program was suspended.

While the program is suspended, you can open the this window for a currently highlighted active variable from a Source window or function panel by selecting Run»View Variable Value in the Source window or Code»View Variable Value in the function panel. In the Source window, you also can right-click the variable you want to examine and select View Variable Value.

LabWindows/CVI displays extended information for certain data types that you can use when debugging your LabWindows/CVI application. Some LabWindows/CVI-defined data types automatically display extended data. For example, a variable of ListType displays the number of list items. You also can expand the variable to view the contained list items. For other data types, you can choose to interpret the variable as a specific data type. For example, to interpret a panel handle variable, which is an integer value, as a true panel handle, right-click the variable and select Specific Type»Panel Handle from the context menu. LabWindows/CVI then displays the title of the panel next to the integer value. You can disable the extended data display by deselecting the Enable extended Variable/Watch window displays checkbox in the Environment dialog box.

The window is divided into two horizontal sections: the global tree and the function tree.

The global tree displays the following variables:

  • Project globals, including all global variables not declared as static
  • Interactive Execution window variables declared in the Interactive Execution window
  • Global variables declared as static

The function tree displays function parameters and local variables from the currently active function. By default, LabWindows/CVI shows the variables and parameters of the function that is currently being executed. To view the parameters and local variables of a different function, double-click the function in the Call Stack. The variable list for each function is grouped in a different section.

You also can view some variables in the Graphical Array View, Array Display, and Memory Display windows. Select the variable you want to view from the Variables and Call Stack window and drag it into the windows or onto the tab if the window is confined.

If you want to define and view your own expressions, add a watch expression. These expressions are shown in the Watch window.

Right-clicking in the Variables and Call Stack window displays the context menu with the following options:

  • Edit ValueChange the value of the variable.
  • Add Watch ExpressionAdd the variable to the Watch window.
  • FindFind text in the Variables section of the window.
  • Specific Type, or when right-clicking an array, Specific Type of Elements
    Note Note  LabWindows/CVI updates this list depending on the instrument drivers that you use in your application. For example, if you load the Programmer's Toolbox, List Type (Toolbox) displays in this list.
    • None (default)—Interpret the variable according to its basic data type.
    • RGB Color—Interpret the data type as a RGB color.
    • Time (ANSI C Library)—Interpret that data as time_tand display the current calendar time.
    • Date Time (UI Library)—Interpret the data type as a DateTime value and retrieve the current date and time.
    • Panel Handle—Interpret the data type as a panel handle and identify the name of the panel.
    • Thread Lock Handle—Interpret the data type as a thread lock handle and identify the handle.
    • Thread-Safe Queue Handle—Interpret the data type as a thread-safe queue handle and identify the handle.
    • TCP Conversation Handle—Interpret the data type as a TCP conversation handle and represent the connection between the server and the client.
    • VISA Instrument Session Handle—Interpret the data type as a VISA instrument session handle and display the name of the device.
  • Element Type—Interpret the contained element for some aggregate data types, such as ListType and CmtTSQHandle, as a specific typed object rather than as a generic memory block. This option appears only if you right-click on an aggregate data type.
  • Format
    • Decimal—View the variable in decimal format.
    • Hexadecimal—View the variable in hexadecimal format.
    • Octal—View the variable in octal format.
    • Binary—View the variable in binary format.
    • ASCII—View the variable in ASCII format.
    • Floating Point—View the variable in floating point format.
    • Scientific—View the variable in scientific format.
    • PreferencesSet default formats.
  • View
  • Options
  • Release/Confine Window—Release the window from the Debugging Region if confined. Confine the window into the Debugging Region if released.

Right-clicking the tab of this window displays the context menu with the following options:

  • Close—Close the window.
  • Release Window—Remove the window from the Debugging Region.


Not Helpful