Qt Creator: No debug with source



  • I just started with Qt Creator and I am not able to debug with source info (only assembler code and no breakpoints).

    The project is a small C++ application (no Qt, references Boost libraries) based on CMake.

    I am running on a Mac and if I generate an XCode project for it debugging works fine.

    What could be wrong?

    /Johannes



  • Are you sure you are compiling with debugging symbols enabled (the "-g" option to gcc/clang)?



  • The problem was that Qt Creator created a make script without -g (I do not know why) and there is no configuration possibility for cmake inside Qt Creator.

    After editing the resulting cmake cache afterwards I got it working.

    Thank you for the hint.


  • Moderators

    Sorry I have to nitpick here: Qt Creator does not create the Makefiles at all. CMakes does that.

    Creator starts cmake for you, yes, but it is your responsibility to "do the right thing". The format of those cmakelists.txt files is so complex that we can not really do more from inside Qt Creator.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.