Important: Please read the Qt Code of Conduct -

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

  • 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
    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?

  • Lifetime Qt Champion


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

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


  • Lifetime Qt Champion

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

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

  • 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!

  • Hello!

    This really doesn't work:

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

    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?

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

  • 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).

  • 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!

  • just ran into the same issue. The work around helped me as well. Filed a bug report

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

  • Lifetime Qt Champion

    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

  • 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

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

  • Lifetime Qt Champion

    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 ?

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

  • I finally got it working:

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

Log in to reply