Debug Qt applications
To debug an application:
- Go to Run and Debug (Ctrl+Shift+V or Cmd+Shift+V on macOS).
- Create a launch.json file (1) that contains launch configurations. For more information, see VS Code: Debugging in the VS Code documentation.
- Select Add Configuration (2), and then select a Qt: Debug debug configuration that matches your debugger.
- Check the launch target (3). To change it, select the target name or go to Command Palette and select CMake: Set Launch/Debug Target.
Select one of the following Qt debug configurations:
- Qt: Debug with cppdbg for debugging C/C++ applications with GDB.
- Qt: Debug with cppvsdbg for debugging C/C++ applications with the Visual Studio Windows debugger.
- Qt: Debug with lldb for debugging with LLDB.
- Qt: Debug Qt WASM with Chrome for debugging Qt WebAssembly applications with Chrome.
See also Debug Qt WebAssembly 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.