MinGW调试模式下Qt应用程序启动缓慢 [英] Slow startup of Qt application in MinGW debug mode

查看:621
本文介绍了MinGW调试模式下Qt应用程序启动缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Win 7上使用带有Qt 5.3的Qt Creator 3.1.1.如果已经设置了VC2013和MinGW 4.8.1两个套件.

I am using Qt Creator 3.1.1 with Qt 5.3 on Win 7. If have set up 2 kits, VC2013 and MinGW 4.8.1.

我的应用程序可以被编译,并且可以与两个编译器一起使用.但是,当我以MinGW/gdb调试模式启动时,启动应用程序会花费很长时间.

My application can be compiled, and works with both compilers. But when I start in MinGW/gdb debug mode, starting the application takes extremely long.

我看到时间花在两件事上.

I can see time is spent for two things.

  1. 无论何时我在Qt Creator中开始调试时,都使用mingw32-make[2]检查每个子项目,并退出一些时间.我可以避免这种情况吗,因为它需要很长时间才能退出.无需更改,无需重新检查.
  2. make步骤最终完成时,应用程序启动,但如下所示加载库很慢.为什么呢,它比VC2013慢得多.
  1. Whenever I start debug in Qt creator checks each sub project with mingw32-make[2] , taking quit some time. Can I avoid this, as it takes quit long. Nothing changed, no need to re-check.
  2. When the make steps eventually completes, application starts but loading the libraries as shown below is slow. Why is that, it is so much slower than VC2013.

有什么机会提高我的表现...?

Any chance how I can improve performance ...?

推荐答案

在Windows下,我们对Qt5/MinGW也存在相同的问题.在Linux下,调试器会在几秒钟内启动该程序,但在Windows下需要几分钟(使用相同的应用程序进行调试)

We have the same problem with Qt5/MinGW under Windows. Under Linux, the debugger starts the program in a few seconds, but takes minutes under windows (with the same application to debug)

此处所述,可能与加载插件等有关.但是,也许并非每个人都希望深入调试其工具链,但我有一个提示,可以作为一种快速的解决方法:

As mentioned here, there may be issues with loading plugins etc. However, probably not everybody want's to dive into debugging their toolchain, I have a hint as a quick workaround:

不要通过按F5/开始调试来开始调试,而是使用Ctrl + R/Run正常运行程序.该程序现在应该很快启动. 启动后,通过将调试器附加到正在运行的应用程序(从调试器菜单)开始调试. 我为此创建了一个快捷键Ctrl-D,因此调用它甚至更快.

Don't start debugging by hitting F5/Start debug, but run the program normal with Ctrl+R/Run. The program should come up quickly now. After startup, start debugging by attaching the debugger to a running application (from the debugger menu). I created a shortcut Ctrl-D for that, so it's even quicker to invoke.

这篇关于MinGW调试模式下Qt应用程序启动缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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