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. Breakpoint set after run is not recognized in Qt Creator
Forum Updated to NodeBB v4.3 + New Features

Breakpoint set after run is not recognized in Qt Creator

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 2 Posters 303 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.
  • C Offline
    C Offline
    cool19940620
    wrote last edited by
    #1

    Hi , everyone~

    In Qt Creator 16.0.2, any breakpoint you set before starting the debugger is hit as expected. However, if you try to add a new breakpoint after the application is already running the IDE marks it but it never becomes “active” and won’t be hit (and can even cause the debugger to hang when setting it).
    What I’ve Tried

    Start debugging with a breakpoint on MainWindow::~MainWindow() → hit OK.
    Once running, click in the margin at QApplication a(argc, argv); to add a new breakpoint → turns red/grey but never activates.
    Stop & restart with that breakpoint set before launching → it works perfectly.
    This happens identically in:
    Qt 5.15.0 project (GDB 11.2.0 + MinGW 8.1.0)
    Qt 6.9.1 project (GDB 13.1.0 + MinGW 13.1.0)

    Image 1: Breakpoint on MainWindow::~MainWindow() (set before run) is recognized and hit.
    image1.png

    Image 2: Breakpoint on QApplication a(argc, argv); (added after run) turns grey and never hits.
    image2.png

    1 Reply Last reply
    0
    • aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote last edited by
      #2

      @cool19940620 Can you have a look in View > Views > Debugger Log? It might contain more insight to the problem.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cool19940620
        wrote last edited by
        #3

        d[GDB] TAKING OWNERSHIP OF BREAKPOINT 37
        d[GDB] RUNNING NEEDS-STOP COMMAND -break-insert -f ""D:/Project/QT_Project/untitled/mainwindow.cpp":8"
        <559-break-insert -f ""D:/Project/QT_Project/untitled/mainwindow.cpp":8"

        d[GDB] 559: -break-insert -f ""D:/Project/QT_Project/untitled/mainwindow.cpp":8"
        d[GDB] 560: -break-insert -f ""D:/Project/QT_Project/untitled/mainwindow.cpp":13"
        d[GDB] TIMED OUT WAITING FOR GDB REPLY. COMMANDS STILL IN PROGRESS: "-break-insert -f ""D:/Project/QT_Project/untitled/mainwindow.cpp":8"", "-break-insert -f ""D:/Project/QT_Project/untitled/mainwindow.cpp":13""

        I have recorded a video, which you can view at the following URL: https://youtu.be/acRtNZ6PJOs

        1 Reply Last reply
        0
        • aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote last edited by
          #4

          @cool19940620 I think you should write a bugreport at bugreports.qt.io and attach this information.

          Please provide a link to the report here so others can follow.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cool19940620
            wrote last edited by
            #5

            Sure—I've filed the issue. You can track the bug report here:
            https://bugreports.qt.io/browse/QTCREATORBUG-33076

            Regards,

            1 Reply Last reply
            1
            • C Offline
              C Offline
              cool19940620
              wrote last edited by
              #6

              Thank you very much for all of your help — I’ve already resolved the issue~
              I referred to the following post:
              https://stackoverflow.com/questions/65263280/qt-android-unable-to-debug-error-unable-to-find-dynamic-linker-breakpoint-fun/65275623#65275623

              Here are the steps I took:

              1.Installed CMake and Ninja using the MaintenanceTool.

              2.Changed the CMake Tool setting to CMake, and the CMake Generator to Ninja.

              3.Removed the line handle SIGTRAP nopass nostop noprint from Preferences → Debugger → GDB.

              After deleting the build directory and rebuilding the project, everything is now working correctly.

              1 Reply Last reply
              1
              • aha_1980A aha_1980 has marked this topic as solved

              • Login

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