Отладчик qt creator linux

Adding Debuggers

The Qt Creator debugger plugin 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. To override this choice, select Edit >Preferences >Kits. For more information about setting up the debugger, see Setting Up Debugger. If you encounter problems, see Troubleshooting Debugger. To add debuggers:

  1. Select Edit >Preferences >Kits >Debuggers >Add.
  2. In the Name field, give a descriptive name for the debugger.
  3. In the Path field, specify the path to the debugger binary:
    • For CDB (Windows only), specify the path to the Windows Console Debugger executable, cdb.exe . The 32-bit version can only debug 32-bit executables, whereas the 64-bit version can debug both 64-bit and 32-bit executables. For more information, see Debugging Tools for Windows.
    • For GDB, specify the path to the GDB executable. The executable must be built with Python scripting support enabled.
    • For LLDB (experimental), specify the path to the LLDB executable.

Qt Creator attempts to identify the type and version of the debugger and shows them in the Type and Version fields. In addition, Qt Creator shows the ABI version that will be used on embedded devices in the ABIs field.

To remove the selected manually added debugger, select Remove. The debugger disappears from the list when you select Apply. Until then, you can cancel the deletion by clicking Restore.

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

Источник

Debugging

The Qt Creator debugger plugin acts as an interface between the Qt Creator core and external native debuggers that you can use to:

  • Debug executable binary files — GNU Symbolic Debugger (GDB), the Microsoft Console Debugger (CDB), and the debugger of the low level virtual machine (LLVM) project, LLDB.
  • Debug QML and Java code and Qt Quick applications — QML/JavaScript debugger.
  • Debug Python source code — PDB.

The following sections describe how to set up, launch, and interact with the debugger:

  • 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, select the (Start Debugging of Startup Project) button or press F5. Other, less common start options are available in the Debug >Start Debugging menu.
  • Debug Mode Views Use the views in the Debug mode to inspect the state of your application while debugging.
  • Stopping Applications You can interrupt a running application before it terminates or to find out why the application does not work correctly. Set breakpoints to stop the application for examining and changing variables, setting new breakpoints or removing old ones, and then continue running the application.
  • Examining Data You can examine variable values and data structures in detail.
  • Remote Debugging You can debug an application that runs on a remote target with the necessary helper processes also running.
  • Debugger Preferences Specify preferences for managing debugger processes. You can specify preferences that are common to all debuggers, or the native debugger that you use, GDB or CDB.
  • 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.

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

Источник

Debug Mode Views

<Debug mode views while debugging data-lazy-src=

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.

Note: The Views menu shows some views only while you are debugging.

Managing Debug Views

When you are not debugging, the Debug mode shows the Debugger Preset perspective:

<Initial Debug mode views data-lazy-src=

Читайте также:  Линукс подсчет количества строк
Оцените статью
Adblock
detector