Important: Please read the Qt Code of Conduct -

Qt creator(4.1.0) is very slow in debug mode

  • Hello All,

    I recently moved to QT creator & noticed that it's super slow in debug mode.
    It's taking 2-3 minutes for every single line & making it unusable.
    I'm in serious doubt if i can ever run Qt creator in debug mode with better performance. I even checked the "Attempt Quick Start" check box in GDB Extended settings in Debugger settings.

    Any ideas how i can improve this performance.?
    btw, i'm on centOs 7 & i had to compile most recent GDB with python which is attached to my current kit in QT creator.

    Also, i heard something like Debugging in release mode, does anyone know what it is.?

    Thanks in advance,

  • Lifetime Qt Champion

    @socalledDeveloper I don't know why debugging is so slow on your machine.
    Regarding your second question "Debugging in release mode" it is same as debugging in debug mode except that your application is build in release mode. Release mode means - no debug symbols + optimizations. Without debug symbols you will not see your code during debugging, only assembly. That makes debugging much harder.

  • Qt Champions 2017

    @socalledDeveloper said in Qt creator(4.1.0) is very slow in debug mode:
    Haven't observed that with my machine, but it might be something with the program you're debugging. How large are the objects you're working with (as number of members). I had the case when I tried debugging some Ogre3D code, sufficed to say they had (probably) hundreds of members in a single object which made debugging (with CDB) impossible, as it was refetching each member's value at each "step over" in the debugger.

    @jsulm There's also the release with debug info (for profiling). I had a problem with that recently, but leaving that aside, -02 -g (g++) will give you optimized code with debug symbols.

  • @socalledDeveloper, I am intrigued as to why you would build your own copy of GDB w/python? I use CentOS 7 in a real-time production environment using the distributed gcc/g++/gnat/gfortran and GDB with no speed or timing problems. I am using Qt5.7 w/QtCreator 4.1.0 installed from and using the default kits.

    It sounds to me like one of your APIs may have a large state to manage. Any debugger can slow down when large arrays of large classes are being stepped into.

    As for release debugging, @kshegunov is correct. But be ready to have optimized step-through. You won't necessarily see what you are expecting or necessarily visit sections of code that get optimized out.

Log in to reply