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. Debugger not recognizing breakpoints.
Forum Updated to NodeBB v4.3 + New Features

Debugger not recognizing breakpoints.

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
9 Posts 3 Posters 2.2k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    SteveB
    wrote on last edited by
    #1

    I am building a project in Qt Creator 4.2.2 using Qt 5.8.0 on macOS 10.12.5. When running in debug, none of the breakpoints are recognized.

    I am using the green arrow with the bug on it to run the project. I have checked the compiler output and the objects are being built with the -g flag. I added the following to my .pro file and ran qmake:

    CONFIG += debug declarative_debug
    CONFIG -= app_bundle release

    The project was originally built in Debian and then cloned from GitHub.

    Any help is appreciated.

    1 Reply Last reply
    0
    • 6thC6 Offline
      6thC6 Offline
      6thC
      wrote on last edited by
      #2

      Are these breakpoints you've added after starting to debug by any chance. I think I've felt this myself.

      I find if I set the breakpoints before I debug seems to work... I also will do a clean build and run qmake if things seem a bit... weird.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SteveB
        wrote on last edited by
        #3

        It doesn't seem to matter when or how I set the breakpoints, it just doesn't see them. I've cleaned the project several times and run qmake.

        Another symptom I've noticed is that changes I make to the code don't show up when I run the debugger, but they do when I run the release version.

        1 Reply Last reply
        0
        • 6thC6 Offline
          6thC6 Offline
          6thC
          wrote on last edited by
          #4

          Delete the current build directory so it has no choice but run with current code? I don't see how it could after that?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SteveB
            wrote on last edited by
            #5

            There doesn't seem to be a build directory. The compiler places the executable in the project directory. I can use lldb to run that executable and set breakpoints. It works as expected. However, whatever executable creator is building for debug doesn't have any of the changes I've made and it ignores the breakpoints.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SteveB
              wrote on last edited by
              #6

              More information.

              The executable that creator was using was in a .app folder in the project directory. I deleted that and rebuilt, but the .app directory is not recreated and the debugger now ends without doing anything.

              In the build and run configuration, current directory is selected and the default build directory is

              ../build-%{CurrentProject:Name}-%{CurrentKit:FileSystemName}-%{CurrentBuild:Name}

              After building, this directory doesn't exist anywhere on my Mac. I think I'm going to file this as a bug.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi and welcome to devnet,

                Is that project available somewhere to take a look at ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SteveB
                  wrote on last edited by
                  #8

                  You arrived just in time! ;)

                  I solved my problem by deleting the app bundle, cleaning the project, and then removing the CONFIG -= app_bundle. After running qmake and building the project, the .app directory is there, and the debugger works now.

                  I had tried this a couple of times before, but apparently something changed between tries. Also, the build directory is nowhere to be found. It appears that the debugger is using the executable in the app bundle.

                  Unfortunately, the project is not in a public repository yet. I can provide everything but the actual code if it would be helpful.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Unless you are writing a console tool, macOS applications should be in a bundle. Depending on what you use in your application you will need the Info.plist file to be present at the right place and maybe add some keys in it in order to access some system features.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    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