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.
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.
To start an application from an open project under the control of a debugger, select the
(
Start Debugging of Startup Project
) button or press
F5
. Other, less common start options are available in the
Debug
>
Start Debugging
菜单。
You can use the tool views in the Debug mode to inspect the state of your application while debugging.
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 .
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.
Illustrates how to debug C++ applications in Qt Creator.
Illustrates how to debug Qt Quick applications in Qt Creator.
If you encounter problems while debugging, check for possible solutions to them.