Unable to debug application in Qt Creator 3.1.2 (Qt 5.3.1) on MacOS X
-
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?
-
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 https://bugreports.qt-project.org/browse/QTCREATORBUG-12791
-
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... -
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
UNEXPECTED STATE 5 FOR BP 7will investigate by looking at the source code, but was just wondering if someone already has the issue.
-
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:
- 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.