Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Very odd behavior with GDB and QTcreator ( Breakpoints not working, debugger works though )
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 2 Posters 929 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rick
    wrote on last edited by Rick
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • R Rick

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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").

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rick
        wrote on last edited by Rick
        #3

        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.

        jsulmJ 1 Reply Last reply
        0
        • R Rick

          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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          R 1 Reply Last reply
          0
          • jsulmJ jsulm

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

            R Offline
            R Offline
            Rick
            wrote on last edited by Rick
            #5

            @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.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved