Local variables and function parameters | Qt Creator Documentation
Description: Inspect local variables and function parameters.

- Qt Creator Documentation
- Local variables and function parameters
- Qt Creator 18.0.2

Evaluating expressions ◦ Peripheral Registers

# 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 selecting 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.

Evaluating expressions ◦ Peripheral Registers