Qt Creator Manual | Debugging

Qt Creator Manual 4.3.0

Testing ◦ Setting Up Debugger

# Debugging

Qt Creator provides a debugger plugin that acts as an interface between the Qt Creator core and external native debuggers such as the GNU Symbolic Debugger (GDB), the Microsoft Console Debugger (CDB), a QML/JavaScript debugger, and the debugger of the low level virtual machine (LLVM) project, LLDB.

- Setting Up Debugger

  The debugger plugin automatically selects a suitable native debugger for each kit from the ones found on your system. You can edit the kits to override this choice.

- Launching the Debugger

  To start an application from an open project under the control of a debugger, press the Debug button in the lower left corner of the main view, or press F5. Other, less common start options are available in the Debug > Start Debugging menu.

- Interacting with the Debugger

  You can use the tool views in the Debug mode to inspect the state of your application while debugging.

- Using Debugging Helpers

  Qt Creator is able to show complex data types in a customized, user-extensible manner. For this purpose, it takes advantage of two technologies, collectively referred to as debugging helpers.

- Debugging Qt Quick Projects

  When debugging a Qt Quick application, you can inspect the state of the application while debugging JavaScript functions. You can set breakpoints, view call stack trace, and examine locals and expressions. While the application is running, you can inspect QML objects and user interfaces, as well as execute JavaScript expressions.

- Debugging a C++ Example Application

  Illustrates how to debug C++ applications in Qt Creator.

- Debugging a Qt Quick Example Application

  Illustrates how to debug Qt Quick applications in Qt Creator.

- Troubleshooting Debugger

  If you encounter problems while debugging, check for possible solutions to them.

Testing ◦ Setting Up Debugger