添加调试器

您可以使用调试器,如 GNU 符号调试器 (GDB)、微软控制台调试器 (CDB)、QML/JavaScript 调试器以及低级虚拟机 (LLVM) 项目的调试器 LLDB。

Qt Creator 调试器会自动从系统中为每个工具包选择一个合适的调试器。要覆盖此选择,请选择首选项> 。Kits

添加调试器:

  1. 选择首选项>Kits >Debuggers >Add

    套件偏好设置中的调试器选项卡

  2. Name 字段中,给出调试器的描述性名称。
  3. Path 字段中,指定调试器二进制文件的路径:
    • 对于 CDB(仅限 Windows),指定 Windows Console 调试器可执行文件的路径cdb.exe

      32 位版本只能调试 32 位可执行文件,而 64 位版本可以调试 64 位和 32 位可执行文件。更多信息,请参阅Windows 调试工具

    • 对于 GDB,请指定 GDB 可执行文件的路径。该可执行文件必须在启用 Python 脚本支持的情况下构建。
    • 对于 LLDB(试验性),请指定 LLDB 可执行文件的路径。

    Qt Creator 系统会尝试识别调试器的类型和版本,并在 和 字段中显示。此外, 还会在 字段中显示嵌入式设备上使用的 ABI 版本。Type Version Qt Creator ABIs

  4. Working directory 字段中,指定应用程序进程的工作目录。如果应用程序在本地运行,工作目录默认为构建目录。如果应用程序在设备上远程运行,其值取决于 shell 或设备。通常情况下,可以将此字段留空。

删除调试器

要删除选定的手动添加的调试器,请选择Remove 。选择Apply 后,调试器将从列表中消失。在此之前,可以点击Restore 取消删除。

另请参阅 调试调试器调试器支持的调试器调试器故障排除

Copyright © The Qt Company Ltd. and other contributors. 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.