Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Very odd behavior with GDB and QTcreator ( Breakpoints not working, debugger works though )



  • So I'm trying to fix this issue for days weeks now, problem:

    Debugging works fine with the build in terminal, however when I try to use a external terminal it seems to disregard my breakpoints.
    Even more odd is that when put a sleep function in my program then stop it. I could step over and in functions just fine, all functionality was there with the exception of breakpoints.
    ( I tried with the latest kits and QTcreator versions as well with different compilers and versions of them all, and yes I've tried "sudo echo 0 > /proc/sys/kernel/yama/ptrace_scope" )


    Note: There was a odd case when it did work, where I was messing with some settings, wasn't able to replicate it afterwards.

    Running Debian 8, feel free to ask system / config info if required.


  • Qt Champions 2019

    @Rick How do you start your app for debugging in that external terminal? You need to start from QtCreator or to attach to already running app ("Debug/Start Debugging/Attach to Running Application").



  • I'm sorry I thought it was kind of obvious from my perspective since I've been busy with it for a long time, there's an option in QTcreator under Project => Build & run => Run => Run in terminal.
    Without it it works fine, but if the option is enabled the debugger doesn't stop at breakpoints.

    The option you describe still has the issue where I could still step in code but breakpoints still aren't functional.


  • Qt Champions 2019

    @Rick Just tested on Windows 7 with Qt 5.7 MinGW (GDB) - it works.



  • @jsulm Suppose it must be my setup then?
    EDIT: I'll do a full reset upon my settings and my external config. I'll see if that fixes things.


Log in to reply