Qt Creator doesn't set breakpoints properly with GDB



  • Hi all,
    I've a problem with Qt Creator, it can't set breakpoints properly, I tried manually debugging with GDB in the command prompt and I could do it, but Qt Creator has better debugging (simpler and easier).
    OS: Windows 10
    Build system: mingw32-make
    Compiler: MinGW 5.3.0 32bit for C++
    Debugger: GNU GDB 7.10.1 for MinGW 5.3.0 32bit

    Video of how I try debugging:
    Note: this isnt my program, its just to show that even a simpler hello world is broken
    https://youtu.be/jvAzB8T8Puc


  • Qt Champions 2017

    Hi @Andrew-Smith,

    do you see something obvious in the debugger log? (Windows > Views > Debugger Log)

    Have you build a debug version?



  • By build a debug version do you mean adding -DDEBUG -g to CFLAGS in my makefile?
    Hooray! Adding the -DDEBUG -g flags to my makefile fixed it!
    Thank you @aha_1980! I googled for this but nothing really came up, thanks!


Log in to reply
 

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