- Qt Creator Documentation
- Local Variables and Function Parameters
- Qt Creator 14.0.0-rc1

Reference

# Local Variables and Function Parameters

The Locals view consists of the Locals pane and the Return Value pane (hidden when empty).

Whenever an application stops under the control of the debugger, it retrieves information about the topmost stack frame and displays it in the Locals view. The Locals pane shows information about parameters of the function in that frame as well as the local variables. If the last operation in the debugger was returning from a function after pressing Shift+F11, the Return Value pane displays the value returned by the function.

You can expand the view contents to check that your application sets a local value correctly.

## Locals View Actions

Right-click the Locals view to select the following actions:

- Add and remove expression evaluators
- Change value display format
- Expand and collapse view contents
- Copy view contents or expression values to the clipboard
- Open view contents in an editor
- Open memory editor
- Set data breakpoints
- Use debugging helpers
- Show and hide tooltips in the view when debugging
- Dereference pointers automatically
- Sort members of classes and structs alphabetically
- Use dynamic object type for display
- Set debugger preferences

## Selecting Object Type for Display

When using GDB, you can specify whether the dynamic or the static type of objects will be displayed. Select Use dynamic object type for display in the context menu. Keep in mind that choosing the dynamic type might be slower.

See also How To: Debug, Debugging, Debuggers, and Debugger.

Reference