您的位置:首页 > 编程语言 > Qt开发

Qt Creater 3.5.1 Windows 下调试

2015-12-10 22:03 471 查看
初次使用Qt 开发,感觉IDE做的很好。轻便而快速。

我在WINDOWS XP 与 WIN7 下使用 Qt Creater 3.5.1 。

XP 下是 用Qt 5.5  , WIN7 是用 Qt 4.8 (这个是前期安装没有卸载)

代码编写一起正常。

在DEBUG调试时发现与 VS2010差距 挺大的,需要指定调试器。

看来VS真是帮我们惯坏了,什么都不用操心。

调试时,提示Unknow debugger type  "NO engine”, Unable to create a debugger engine of the type " No engine"

根本原因:Qt Creater,没有指定好 调试器。

解决办法:

可以参考Qt官网
http://doc.qt.io/qtcreator/creator-debugger-engines.html。
其实有了这个网址就够了。

1.下载 WINDOWS CDB   ( Microsoft Visual C++ Compiler )

CDB 在 WIDK(Windows Driver Kit)包中,所以这个包要一起下。

下载地址:https://msdn.microsoft.com/en-us/windows/hardware/hh852365

根据自己的系统选择合适的包。

XP 与 WIN7 选  WDK 7.1.0 (for Windows XP drivers)。


2. 安装 WDK ,只选择其中的  Debugging Tools for Windows

3. 配置 Qt Creater 5.5.1 ,

Tool -> Options -> Builds & Run -> Debuggers 选刚装 WDK中的 CDB.

4. Setting the Symbol Server in Windows

(照搬Qt 网站的内容了)

To obtain debugging information for the operating system libraries for debugging Windows applications, add the Symbol Server provided by Microsoft to the symbol search path of the debugger:

Select Tools > Options > Debugger >
CDB.
In the Symbol paths field, open the Insert menu and select
Symbol Server.
Select a directory where you want to store the cached information and click
OK
.
Use a subfolder in a temporary directory, such as
C:\temp\symbolcache
.

Note: Populating the cache might take a long time on a slow network connection.

Note: The first time you start debugging by using the Debugging tools for Windows, Qt Creator prompts you to add the Symbol Server.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Qt 调试 C++