- Qt Creator Manual
- Debug Mode Views
- Qt Creator Manual 10.0.0-rc1

Launching the Debugger ◦ Viewing Call Stack Trace

# Debug Mode Views

In the Debug mode, you can inspect the state of your application while debugging. You can interact with the debugger in many ways, including the following:

- Go through a program line-by-line or instruction-by-instruction.
- Interrupt running programs.
- Set breakpoints.
- Examine the contents of the call stack.
- Examine and modify contents of local and global variables.
- Examine and modify registers and memory contents of the debugged program.
- Examine the list of loaded shared libraries.
- Disassemble sections of code.

Qt Creator displays the raw information from the native debuggers in a clear and concise manner with the goal to simplify the debugging process as much as possible without losing the power of the native debuggers.

In addition to the generic IDE functionality of the stack view, views for locals and expressions, registers, and so on, Qt Creator includes features to make debugging Qt-based applications easy. The debugger plugin understands the internal layout of several Qt classes, for example, QString, the Qt containers, and most importantly QObject (and classes derived from it), as well as most containers of the C++ Standard Library and some GCC extensions. It uses this deeper understanding to present objects of such classes in a useful way.

Interact with the program you are debugging in the following views.

View | Purpose | Learn More
--- | --- | ---
Stack | Examine the the nested function calls leading to the current position as a call stack trace. | Viewing Call Stack Trace
Breakpoints | Set breakpoints with conditions make the application stop in a controlled way. A watchpoint stops the application when the value of an expression changes. | Setting Breakpoints
Threads | Switch between threads. | Viewing Threads
Modules | View information about modules included in the application. | Viewing Modules
Source Files | View a list of source files included in the project. | Viewing Source Files
Locals | View information about the parameters of the function in the topmost stack frame and local variables. | Local Variables and Function Parameters
Expressions | Compute values of arithmetic expressions or function calls. | Evaluating Expressions
Registers | View the current state of the CPU registers to examine the application at the machine level. | Viewing and Editing Register State
Peripheral Registers | View the current state of peripheral registers. |
Debugger Log | View debug output to find out why the debugger does not work. The log view acts as a console, so you can send the contents of the line under the text cursor in the log directly to the native debugger. | Troubleshooting Debugger Directly Interacting with Native Debuggers
Disassembler | View disassembled code for the current function. | Viewing Disassembled Code
Editor | Open the current source file in the text editor for changing it. | Working in Edit Mode

## Managing Debug Views

The availability of views depends on whether you are debugging C++ or QML. Frequently used views are shown by default and rarely used ones are hidden. To change the default settings, select View > Views, and then select views to display or hide. Alternatively, you can enable or disable views from the context menu of the title bar of any visible debug mode view.

You can drag and drop the views in Qt Creator to new positions on the screen. The size and position of views are saved for future sessions. Select View > Views > Reset to Default Layout to reset the views to their original sizes and positions.

To save space on the screen, select View > Views > Automatically Hide View Titlebars.

To show and hide columns in views, toggle Show Column in the context menu.

## Customizing Debug Views

You can change the appearance and behavior of the debug views by specifying settings in Preferences > Debugger. For example, you can:

- Use alternating row colors in debug views.
- Adopt font size changes from the main editor.
- Have tooltips displayed in the main editor while you are debugging.
- Close temporary source and memory views and switch to the previously used Qt Creator mode when the debugger exits.
- Bring Qt Creator to the foreground when the debugged application is interrupted.

For more information, see Debugger Preferences.

Launching the Debugger ◦ Viewing Call Stack Trace