Important: Please read the Qt Code of Conduct -

[Solved] Debugging to the source of Qt?

  • Hi,
    Sometimes I find myself in situations where I want to debug into the source code of Qt.
    I am using the LGPL license Qt 4.8.1 SDK with MinGw compiler.
    Is it legal for me to debug into the Qt code?
    If yes, then how do I do so?

  • Moderators

    By all means, AFAIK. Qt libraries come with both release and debug libs included by default. Just build your project in debug mode and start debugging.

  • Hi sierdzio,

    Yes I can find the debug libraries in my Qt installation.
    But when I am debugging, if I press F10 or F11 for a Qt API then it does not go into the Qt's source code.
    I am also unable to find the .cpp source files of Qt in my installation.
    Is this the reason for that?
    Should I re-install Qt?

  • Moderators

    Ah, OK, maybe the code is missing, as it should be working. I can't really confirm if reinstallation would work - if the packagers did not put the code in there, it won't appear even after you install again. You can try compiling Qt from source, it's not very hard (although it takes a while).

  • I have found that if both the debug and release dlls of Qt are available, I cannot debug into Qt. If only the debug dlls are available, it works.
    This goes for VS 2010, but it might be worth a try on MinGW.

Log in to reply