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. Unable to debug application in Qt Creator 3.1.2 (Qt 5.3.1) on MacOS X
QtWS25 Last Chance

Unable to debug application in Qt Creator 3.1.2 (Qt 5.3.1) on MacOS X

Scheduled Pinned Locked Moved Qt Creator and other tools
17 Posts 6 Posters 16.9k 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.
  • V Offline
    V Offline
    vpodlovchenko
    wrote on last edited by
    #1

    Hello!

    I have a problem running debugger... And can't even find any idea how to fix it... I only have next messages:

    In Qt Creator's Application output:

    Debugging starts
    Debugging has failed
    Debugging has finished

    And in console (if I run it from console):

    ~/Qt/Qt\ Creator.app/Contents/MacOS/Qt\ Creator
    Unexpected GDB stderr: "Undefined command: "python". Try "help".
    Undefined command: "python". Try "help".
    Undefined command: "python". Try "help".
    "
    Warning: HANDLE RUNCONTROL START FAILED (no active run control)
    Warning: State changed from EngineSetupFailed(2) to DebuggerFinished(23) [master] (no active run control)
    Warning: State changed from EngineSetupFailed(2) to DebuggerFinished(23) (no active run control)
    Warning: (gdb) (no active run control)
    Warning: UNEXPECTED GDB STDERR: No symbol table is loaded. Use the "file" command.
    (no active run control)
    Unexpected GDB stderr: "No symbol table is loaded. Use the "file" command.
    "
    Warning: 14^error,msg="No symbol table is loaded. Use the \"file" command." (no active run control)
    Warning: (gdb) (no active run control)

    What I can check find the problem and to fix it?

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

      Hi,

      There's something pretty fishy here, python is unknown ?

      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
      • V Offline
        V Offline
        vpodlovchenko
        wrote on last edited by
        #3

        No, python is here! I don't understand why Qt and GDB need python, but I can run it from anywhere:

        $ python
        Python 2.7.5 (default, Mar 9 2014, 22:15:05)
        [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
        Type "help", "copyright", "credits" or "license" for more information.

        ^D
        $

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

          Qt doesn't however gdb uses python for e.g. pretty printing. Anyway, did you build the debugging helpers ?

          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
          • V Offline
            V Offline
            vpodlovchenko
            wrote on last edited by
            #5

            No, I didn't because I can't find where to do it in Qt Creator 3.1.2.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andreyc
              wrote on last edited by
              #6

              What version of gdb do you have on the system?
              It is possible that gdb does not support python.
              You can check it by something like this.
              @
              (gdb) python print("Hello, world!")
              Hello, world!
              (gdb)
              @

              1 Reply Last reply
              0
              • V Offline
                V Offline
                vpodlovchenko
                wrote on last edited by
                #7

                Hello!

                This really doesn't work:

                @gdb
                GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb 6 22:51:23 UTC 2013)
                Copyright 2004 Free Software Foundation, Inc.
                GDB is free software, covered by the GNU General Public License, and you are
                welcome to change it and/or distribute copies of it under certain conditions.
                Type "show copying" to see the conditions.
                There is absolutely no warranty for GDB. Type "show warranty" for details.
                This GDB was configured as "x86_64-apple-darwin".
                (gdb) python print("Hello, world!)
                Undefined command: "python". Try "help".
                (gdb)
                @

                But earlier (in previous versions of Qt) debugging worked... I think I upgraded Xcode (and gdb) since that too... Do you think I have to find version of gdb with python working?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andreyc
                  wrote on last edited by
                  #8

                  If i'am not mistaken latest qtcreator does not work with gdb without python.
                  You may need to update osx development tools. I think the latest comes with gdb 7.x which support python.

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    vpodlovchenko
                    wrote on last edited by
                    #9

                    I looked for information about gdb and python in Qt debugging and found that:

                    MacOS gdb really doesn't support python as scripting language

                    That's why Qt Creator under MacOS need C++ debugging helpers

                    but in my QtCreator there is no button "Build all" or "Build debugging helpers" as in previous versions... Only common information about Qt, path, etc.

                    Is there any way to build C++ debugger helpers from console?

                    Why it still doesn't work if a turn debugging helpers off (if I understand well - helpers are used for pretty printing variables).

                    I'm quite sure that I have latest MacOS development tools installed (not betas, but latest stable).

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      vpodlovchenko
                      wrote on last edited by
                      #10

                      Thanks to everybody for very helpful information, I've created custom Qt configuration using lldb instead of gdb (by default automatic Qt configuration uses gdb and doesn't allow to change it) and debugging started to work!

                      1 Reply Last reply
                      0
                      • VladimirMinenkoV Offline
                        VladimirMinenkoV Offline
                        VladimirMinenko
                        wrote on last edited by
                        #11

                        just ran into the same issue. The work around helped me as well. Filed a bug report https://bugreports.qt-project.org/browse/QTCREATORBUG-12791

                        --
                        Vladimir

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mkrus
                          wrote on last edited by
                          #12

                          I ran in to a similar error after upgrading to Xcode 6, lldb would just sit there doing nothing...
                          Manually adding the Xcode5 version of lldb to Qt's settings and selecting that in my Creator settings fixed the issue for now...

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

                            Xcode 6 brought some modification in the way to handle lldb but it should be fixed in Qt Creator 3.2.

                            If you can't upgrade you can find the solution to apply in the "LLDB hangs while being launched on Mac OS X" thread on the interest mailing list

                            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
                              sysedit
                              wrote on last edited by
                              #14

                              Hi,

                              I'm experiencing something similar since I upgraded to Yosemite (10.10). I can run the debugger, but it never stops at breakpoints.
                              The app is correctly run via lldb (if there is a crash or an assertion failed, the debug shows up and I can browse the call stack), but breakpoints are not correctly set.

                              running lldb manually on the same executable, setting there breakpoint works as expected.

                              I'm trying today's snapshot without success.

                              In console, I can see the following when I set a breakpoint, when a debug session has been started:
                              SOFT ASSERT: "false" in file /work/build/qtsdk/qt-creator/src/plugins/debugger/lldb/lldbengine.cpp, line 684
                              SOFT ASSERT: "false" in file /work/build/qtsdk/qt-creator/src/plugins/debugger/lldb/lldbengine.cpp, line 619
                              UNEXPECTED STATE 5 FOR BP 7

                              will investigate by looking at the source code, but was just wondering if someone already has the issue.


                              sysedit

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

                                IIRC, there was also a modification to how lldv should be initialized (can't remember the details though)

                                Which version of Qt Creator are you using ?

                                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
                                  sysedit
                                  wrote on last edited by
                                  #16

                                  I'm currently running today's master snapshot (3.2.81 - 2adc5c5dc6) ; I'll double check with 3.2.2 release, but I had the issue as well.

                                  AFAIR the issue started directly when upgrading to 10.10, even without upgrading Xcode.


                                  sysedit

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    sysedit
                                    wrote on last edited by
                                    #17

                                    I finally got it working:

                                    • I was using launchd.conf to set environment variables, which is not working with Yosemite (see http://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosemite). I changed that so all my path, CC and other variables are taken into account
                                    • I'm using ccache, I cleared the cache and rebuilt everything.

                                    Not sure if the launchd change or clearing ccache did the trick, but now it works - thanks.


                                    sysedit

                                    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