Debug applications

You can debug:

  • Qt C++ applications using the Visual Studio debugger.
  • Qt Quick applications using the QML debug engine.
  • Applications on Linux using GDB.

Set breakpoints in C++ and QML files and step through the execution of code. While in break mode, watch variables and change their values, as well as evaluate arbitrary expressions. For Qt Quick applications, a QML debugging session runs concurrently to a C++ debugging session, which enables you to set breakpoints and watch variables in both C++ and QML during the same debugging session.

To start a debugging session:

  • Go to Debug > Start Debugging.
  • To debug a CMake project, select the main source file inSolution Explorer and then select Set as Startup Item in the context menu.
  • Press F5.

See also Tutorial: Qt Quick debugging, Cross-compile, Debug on Linux, Enable QML debugging, and Debugging Qt Quick Applications.

© 2024 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.