Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 6781|回复: 2
打印 上一主题 下一主题

解决qt调试时Unknown debugger type "No Engine"

[复制链接]

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
跳转到指定楼层
楼主
发表于 2017-1-20 11:22:08 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式


问题描述如图,qt能编译不能调试
发生原因:
windows的qt有两个版本

一种是vs的编译器,一种是MinGW的。
种问题主要是发生在选择了MSVC2013编译器的版本,这个版本的qt需要再装一个调试器,而MinGW不用。
解决方法:3 ways to get Debugging Tools for Windows
  • As part of the WDK
    Install Microsoft Visual Studio and then install the Windows Driver Kit (WDK). Debugging Tools for Windows is included in the WDK. You can [size=1em]get the integrated environment here.
  • As part of the Windows SDK
    Install the Windows Software Development Kit (SDK). Debugging Tools for Windows is included in the Windows SDK. You can [size=1em]get the Windows SDK here.
  • As a standalone tool set
    If you want to download only Debugging Tools for Windows, [size=1em]install the Windows SDK, and, during the installation, select the Debugging Tools for Windows box and clear all the other boxes.



点击图中的方框所示的链接,进入下载页面。

然后,运行下载的sdksetup.exe,前面的选项都保持默认即可,直到下图所示的界面,去掉多余的选项,仅仅保留“Debugging Tools for Windows”。

默认情况下,调试器会被安装在:C:\Program Files (x86)\Windows Kits\8.1\Debuggers
安装完成后,就可以在安装目录下面找到cdb.exe调试器。

接下来,就需要克隆一个Qt Kits的配置,然后在下拉列表中选择cdb对应的版本,有32位和64位之分,如下图所示。

回复

使用道具 举报

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
沙发
 楼主| 发表于 2017-1-20 11:40:56 | 只看该作者
本帖最后由 firemail 于 2017-1-20 12:09 编辑

环境
QtCreator:3.5.1
系统;win7 64位 旗舰

参考
用Qt创建了一个新的项目Qt Quick Controls Application之后,构建,运行都顺利进行,但是调试直接提示:
整合QML/C++-调试需要的从属调试引擎无法被创建: Unknown debugger type “No engine”
Unable to create a debugger engine of the type “QML C++ engine”

解决方案
简单来说问题的原因就是没有配置相应的调试工具!
所以我们需要下载相应的WDK,Windows 驱动包

WDK 7.1.0 (for Windows XP drivers)
[size=0.9375]Developing a driver for Windows XP or Windows Server 2003? WDK 7.1.0 has the tools, code samples, docs, compilers, headers, and libraries that you can use to create drivers for these operating systems.


在页面的最左下角,别看写着for XP,但是也有Win7的~一个600+M的ISO文件~

下载完之后运行压缩包里面的KitSetup.exe,选择Windows7

然后出现如下界面,选择Debugging Tools for Windows;
接下来选择安装的路径~安装~
C:\WinDDK\7600.16385.1\


配置QtCreator
安装完成之后还需要去Qt中配置一下;
在Qt中选择:Tool(工具) -> Options(选项) -> Builds & Run(构建和运行) -> Debuggers,在其中添加刚才安装的WDK路径下的cdb.exe可执行文件~

然后在构建套件(Kit)中选择自动匹配到的编译器,我的是VS2010~,在调试器中选择刚才添加进来的cdb debuggers,确定~
现在开始调试程序就OK了,在QML中加断点调试也是OK的啦~

回复 支持 反对

使用道具 举报

1228

主题

1997

帖子

7582

积分

认证用户组

Rank: 5Rank: 5

积分
7582
板凳
发表于 2020-1-18 12:09:52 | 只看该作者
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-5-6 03:39 , Processed in 0.060775 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表