qt造物主调试慢 [英] qt creator debug slow

查看:175
本文介绍了qt造物主调试慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows 7 64位上基于Qt 4.7.4运行Qt Creator 2.3.0.当我从Qt Creator(ctrl + r)运行该应用程序时,一切正常.但是,当我调试(F5)时,执行每一行会花费很多时间-有时需要2分钟才能执行一行代码.

I'm running Qt Creator 2.3.0, based on Qt 4.7.4, on Windows 7 64-bit. When I run the app from Qt Creator (ctrl+r), everything works great. However, when I debug (F5), executing each line takes forever - as in sometimes 2 minutes to execute a single line of code.

我在调试器日志"窗口中注意到以下行:调试器:C:\ Program Files(x86)\ Windows调试工具(x86)\ cdb.exe.我以为,由于我正在运行Windows 7 x64,因此我应该使用64位调试器.因此,我按照朋友的建议下载并安装了适用于Windows 7和.NET Framework 3.5 SP1的Microsoft Windows SDK.

I noticed in the Debugger Log window this line: Debugger: C:\Program Files (x86)\Debugging Tools For Windows (x86)\cdb.exe. I thought since I'm running Windows 7 x64, I should be using the 64-bit debugger. So, I downloaded and installed the Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 as a friend suggested.

现在,我在Tools..Options..Tool Chains中看到了许多自动检测到的工具.如果我选择Windows的任何Microsoft Windows SDK-x86,x64,ia64或任何Microsoft Visual C ++编译器9.0-x86,amd64,x64,ia64-调试器均设置为"C:\ Program Files(x86) \ Windows调试工具(x86)\ cdb.exe",并且已禁用,因此我无法对其进行更改.

Now I see that in Tools..Options..Tool Chains, I have a number of Auto-detected tools. If I select any of the Microsoft Windows SDK for Windows - x86, x64, ia64, or any of the Microsoft Visual C++ Compiler 9.0 - x86, amd64, x64, ia64 - the Debugger is set to "C:\Program Files (x86)\Debugging Tools For Windows (x86)\cdb.exe", and is disabled so I can't change it.

如何说服Qt Creator使用64位版本的cdb?这和我的主要问题超慢调试有关吗?

How do I convince Qt Creator to use the 64-bit version of cdb? Is that related to my major problem, the super-slow debugging?

推荐答案

在安装适用于Windows 7和.NET Framework 3.5 SP1的Microsoft Windows SDK之后,我升级到了Qt Creator 2.4.现在,当我调试时,它开始使用x64 cdb!由于某些原因,最初的几次仍然很慢.但是,当我尝试计时时,它现在正在以合理的速度运行.甚至在重新启动Qt Creator甚至重新启动后,调试现在都以合理的速度运行:第一次启动我的主要表单可能需要2-3秒,之后需要1秒.过去通常需要一分钟到20分钟的时间.

After installing Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1, I upgraded to Qt Creator 2.4. Now when I debug, it started using x64 cdb! The first couple times were still very slow for some reason. However, when I tried to time it, it's now working at a reasonable speed. Even after re-starting Qt Creator or even rebooting, debugging is now running at a reasonable speed: maybe 2-3 seconds to bring up my main form the first time, and 1 second thereafter. Used to take anywhere from a minute to 20 minutes.

所以它现在正在工作!希望这对某人有帮助.

So it's working now! Hope this is helpful to someone.

这篇关于qt造物主调试慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆