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.
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
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.
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.