Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Slow debugger



  • Hi,
    I have problems with the debugger, it is very slow.
    My setup is as follows:

    • Kubuntu 18.04,
    • Kernel version: 4.15.0-62-generic
    • GCC version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
    • Qt version shipped with Kubuntu: 5.9.5

    I'm running Qt Creator 4.10.0 based on Qt 5.13.1 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit).
    Besides the Qt shipped with Ubuntu, I also have Qt 4.8.7 and Qt 5.12.5 installed manually.

    I can compile my non-trivial Qt Widgets application on the various versions of Qt with very different results:

    • With Qt 4.8.7 both compile and debug are fast. Debugging is almost instantaneous.
    • With Qt 5.95 and 5.12.5 compile takes twice the time it takes with Qt 4 (I can live with it), but debugging is unacceptably slow (the spinner lasts for about 20 seconds on screen before showing actual breakpoint data). Data preview inside tooltips appear to work normally, although it is difficult to estimate.

    Toggling the different options in Kits/Debugger/GDB does not improve debug performance. Increasing the GDB timeout parameter does not increase the delay.

    Bumping my head on the wall: what am I doing it wrong?


  • Lifetime Qt Champion

    Hi @lorenzocorti,

    Bumping my head on the wall: what am I doing it wrong?

    Stop bumping! Probably you don't do anything wrong?

    With Qt 5.95 and 5.12.5 compile takes twice the time it takes with Qt 4

    I remember, someone complained about this years ago. IIRC, the problem is that the Qt headers nowadays include lots more of stuff, including STL.

    To overcome this, you can use precompiled headers and/or class forward declarations. I assume you already compile with make -jX where X is the number of cores?

    but debugging is unacceptably slow (the spinner lasts for about 20 seconds on screen before showing actual breakpoint data).

    Which debugger version is that? We have a similar report: QTCREATORBUG-22896 but so far it's hard to reproduce. You might want to comment on the report, and maybe you have a minimal reproducer.


Log in to reply