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. Qt Creator won't stop at breakpoints
Forum Updated to NodeBB v4.3 + New Features

Qt Creator won't stop at breakpoints

Scheduled Pinned Locked Moved Qt Creator and other tools
11 Posts 4 Posters 28.5k 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #2

    Are you building in Debug mode? If you compile in release, debugger has no symbols to catch on runtime.

    (Z(:^

    1 Reply Last reply
    1
    • C Offline
      C Offline
      cpsmusic
      wrote on last edited by
      #3

      Just to make sure I'm doing the right thing, how do I build in Debug mode?

      What I'm currently doing is:

      Clean All
      Rebuild All

      Then, with the Project set to Debug (the fourth button from the bottom in the lower left corner), I click on the Debug button (the second button from the bottom in the lower left corner).

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #4

        Good steps but in wrong order :)

        Set Project to Debug mode (Projects pane on the left, or fourth icon from the bottom, as you already wrote).

        Clean All.

        Rebuild All / Run Debugger (second icon from the bottom or F5).

        (Z(:^

        1 Reply Last reply
        1
        • E Offline
          E Offline
          eugenk
          wrote on last edited by
          #5

          I also have the same problem. Now I install gdb from macports and (it seems) all works. I cannot say exactly yes, because I not use qt creator too often now. But kind of it works. The two things:

          1. You must sign your new gdb with codesign using self-created code certificate (create it using key chain application)
          2. You must edit /usr/bin/gdb script to make it to call your new gdb instead old one.
          1 Reply Last reply
          0
          • C Offline
            C Offline
            cpsmusic
            wrote on last edited by
            #6

            I tried what suggested by sierdzio above however the program is still not stopping at the breakpoint.

            Any other suggestions?

            1 Reply Last reply
            0
            • E Offline
              E Offline
              eugenk
              wrote on last edited by
              #7

              Try my method - replace gdb from XCode to gdb from macports.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cpsmusic
                wrote on last edited by
                #8

                Two things make me a bit reluctant to try your method:

                1. New Qt Creator projects debug properly, which makes me thing it's something to do with the particular project I'm trying to debug.

                2. Will installing a different gdb affect the working of Xcode?

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cpsmusic
                  wrote on last edited by
                  #9

                  Just a bit more on this problem - I checked the sizes of the two executables and they're identical - shouldn't the debug version be bigger?

                  Also, the two paths are:

                  /Users/chris/Desktop/pencil2d-code/debug shadow build/release

                  /Users/chris/Desktop/pencil2d-code/release shadow build/release

                  Does the fact that both paths put the executable in a "release" folder indicate anything?

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    eugenk
                    wrote on last edited by
                    #10

                    [quote author="cpsmusic" date="1359163689"]Just a bit more on this problem - I checked the sizes of the two executables and they're identical - shouldn't the debug version be bigger?

                    Also, the two paths are:

                    /Users/chris/Desktop/pencil2d-code/debug shadow build/release

                    /Users/chris/Desktop/pencil2d-code/release shadow build/release

                    Does the fact that both paths put the executable in a "release" folder indicate anything?[/quote]

                    Yes, debugging must me bigger and noticeably bigger. For example write simplest Hello World in usual C and compile it with and without -g flag. If you have the same executable sizes, this means that you have wrong settings. Check qmake flags for debugging target. It must be some like this:
                    qmake /Users/eugenk/Projects/QT/qt-creator-2.6.1-src/qtcreator.pro -r -spec macx-g++ CONFIG+=debug CONFIG+=x86_64 CONFIG+=declarative_debug CONFIG+=qml_debug

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Miguel A.
                      wrote on last edited by
                      #11

                      I have same problem, I solved it with the following configuration the .pro

                      CONFIG -= app_bundle

                      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