如何在 Qt Creator 中配置 CDB?

How to configure CDB in Qt Creator?(如何在 Qt Creator 中配置 CDB?)

本文介绍了如何在 Qt Creator 中配置 CDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处的问题与我的相同,但那里的解决方案对我不起作用.我在 Windows 7 上使用 QtCreator 2.4.1.当我尝试调试一个简单的 hello world 应用程序时,显示的消息是:用于调试x86-windows-msvc2010-pe-32bit"类型二进制文件的首选调试器引擎不是可用....详细信息:没有可用于格式为x86-windows-msvc2010-pe-32bit"的二进制文件的 CDB 二进制文件

The question here is the same as mine but the solution there is not working for me. I am using QtCreator 2.4.1 on Windows 7. When I try to debug a simple hello world app the message displayed is: "The preferred debugger engine for debugging binaries of type 'x86-windows-msvc2010-pe-32bit' is not available....Details: There is no CDB binary available for binaries in format 'x86-windows-msvc2010-pe-32bit"

当我发现 cdb.exe 不在我的系统上时,我安装了带有调试器工具的 Windows SDK,并且 cdb.exe 的当前位置是C:Program Files (x86)Windows Kits8.0Debuggersx86cdb.exe"和C:Program Files (x86)Windows Kits8.0Debuggersx64cdb.exe",

When I found that cdb.exe was not on my system I had Windows SDK installed with debugger tools and the current location of cdb.exe is "C:Program Files (x86)Windows Kits8.0Debuggersx86cdb.exe" and "C:Program Files (x86)Windows Kits8.0Debuggersx64cdb.exe",

在CDB选项卡中我配置了符号服务器以及CDB.exe的路径,但没有成功!

In the CDB tab I configured symbol server as well as the path of CDB.exe, but in vain!

QtCreator->Tools->options->Debugger->CDB Tab->有以下字段:
附加参数
使用国行控制台
符号路径
源路径
正确的断点位置等...

QtCreator->Tools->options->Debugger->CDB Tab->has the following fields:
Additional arguments
use CDB console
Symbol Paths
Source Paths
Correct breakpoint location etc...

有人可以详细解释这些是什么意思以及这里期望的值是什么.有没有人使用 Qt Creator 成功调试过任何应用程序.

Can somebody kindly explain in detail what these mean and what values are expected here. Has anybody successfully debugged any applicaiton using Qt Creator.

请参考此链接:
http://qt-project.org/forums/viewthread/16018/

推荐答案

我也遇到了同样的问题,终于想出了如何解决这个问题.Styne666给了我一个提示.执行以下操作:

I was having the same problems too, and finally figured out how to solve this. Styne666 gave me a hint. Do the following:

  1. 工具
  2. 选项...
  3. 构建和运行
  4. 工具链
  5. 使用克隆"按钮复制每个自动检测到的 MSVC 项目
  6. 在每个克隆项目中,您可以在调试器"字段中指定调试器(例如 C:Program FilesWindows Kits8.0Debuggersx64cdb.exe)
  7. 此后,一切似乎都正常了...

我应该进一步提到,如果您像我一样运行 64 位版本的 Windows 和 32 位版本的 Qt Creator,您需要确保您指向的是 32 位版本的 cdb (其中有 x86 和 x64 target 版本).所以对于 32 位目标版本,我运行这个:

I should further mention that if you are running a 64-bit version of Windows and a 32-bit version of Qt Creator like I am, you need to make sure that you are pointing to the 32-bit versions of cdb (of which there are x86 and x64 target versions). So for the 32-bit target builds I run this:

C:Program Files (x86)Windows Kits8.0Debuggersx86cdb.exe

对于 x64 构建,我运行这个:

And for x64 builds I run this:

C:Program Files (x86)Windows Kits8.0Debuggersx64cdb.exe

棘手的部分是让 Microsoft 在您的 64 位机器上安装 32 位版本的调试工具有些困难.一位同事最近尝试这样做,并说他需要安装 Windows 8 工具才能选择这样做 - Windows 7 版本不会让你这样做.

The tricky part is that it is somewhat difficult to get Microsoft to install the 32-bit version of the debugging tools on your 64-bit machine. A co-worker tried to do so recently and said that he needed to install the Windows 8 tools in order to have the option to do that - the Windows 7 versions would not let you.

这篇关于如何在 Qt Creator 中配置 CDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何在 Qt Creator 中配置 CDB?

基础教程推荐