Please nominate your Qt Champions for 2021!

How to set up Qt debugging for Makefile projects?

  • I'm trying to get debugging for my makefile project to work. Debugging works fine on Qt projects that use qmake.
    I'm running Mac OS X Mountain Lion, Qt 4.7.4 and Qt Creator 2.4.1, and trying to debug a .c project.

    When I set up break points and tell debugger to run it runs ignoring break points - although it stops on segment fault causing lines, so it runs after all, and not just fails to start. Here's a pastebin link to first ~150 lines of debug log
    It contains information about some errors, but I'm a debugging newbie, and don't understand them, and even less what to do about them. I suspect it's something with gdb not working with python (it complains about undefined command 'python'), but then again even though similar errors are there when working with qmake projects, debugger seems to function for the latter:

  • Did you create your binary with debug information, i.e. did you pass -g to the compiler command line?

  • Such a simple solution! And shows how little I know about debugging. Thank you for your help, andrep.

Log in to reply