Unsolved Can't Debug: Qt5.5.1 LLDB on OSX
-
I recently had to re-install my whole OSX machine. When I tried to put Qt back (using a fresh download and install) suddenly my LLDB debuggin just hangs.
Steps to reproduce:
- Create a new default console app. Just the standard template one. Nothing fancy.
- Set a breakpoint inside
main()
- Make sure you're on
debug
mode. - qmake, build then hit
cmd-y
(osx debug)
I get a terminal but everything hangs.
my output from "Compile output" just says "Debugging starts"
The only output from the terminal is as follows
MyMAchine:~ myuser$ cd /Users/myuser/Qt; /Users/myuser/Qt/Qt\ Creator.app/Contents/MacOS/../Resources/qtcreator_process_stub debug /var/folders/tw/yf67h38j5775v4s43c39qpth0000gn/T/QtCreator.c16720/stub-socket Press\ \<RETURN\>\ to\ close\ this\ window... /Users/myuser/Projects/nar/build-TEST-Clone_of_Desktop_Qt_5_5_clang_64bit-Debug /var/folders/tw/yf67h38j5775v4s43c39qpth0000gn/T/QtCreator.q16720 16720 /Users/myuser/Projects/nar/build-TEST-Clone_of_Desktop_Qt_5_5_clang_64bit-Debug/TEST
The machine is pretty vanilla:
OSX: 10.11.3 XCode: 7.2.1 Qt: 5.5 clang 64bit LLDB: lldb-340.4.119.1
Might be related to:
https://bugreports.qt.io/browse/QTCREATORBUG-8825
I'm really stumped here. Anyone have any thoughts of where I could start looking to figure this out?
-
Console + LLDB is simply not implemented yet. Switch off 'Run in Terminal' in your project's Run settings, and it should work.
-
Xcode 7.2.1 breaks debugging with Qt Creator 3.6.1. You need a patch.
https://codereview.qt-project.org/#/c/154748/
I have those diff applied and I can debug fine:
diff -Naur /original/Qt Creator/Qt Creator.app/Contents/Resources/debugger/dumper.py /new/Qt Creator.app/Contents/Resources/debugger/dumper.py --- /original/Qt Creator/Qt Creator.app/Contents/Resources/debugger/dumper.py 2016-03-14 18:59:09.000000000 +1100 +++ /new/Qt Creator.app/Contents/Resources/debugger/dumper.py 2016-04-08 15:44:48.000000000 +1000 @@ -475,6 +475,8 @@ # Hex encoding operating on str or bytes, return str. def hexencode(self, s): + if not s: + return '' if sys.version_info[0] == 2: return s.encode("hex") if isinstance(s, str): diff -Naur /original/Qt Creator/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py /new/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py --- /original/Qt Creator/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py 2016-03-14 18:59:09.000000000 +1100 +++ /new/Qt Creator.app/Contents/Resources/debugger/lldbbridge.py 2016-04-08 15:45:17.000000000 +1000 @@ -1405,12 +1405,12 @@ elif eventType == lldb.SBProcess.eBroadcastBitSTDOUT: # FIXME: Size? msg = self.process.GetSTDOUT(1024) - self.report('output={channel="stdout",data="%s"}' - % self.hexencode(msg)) + if msg is not None: + self.report('output={channel="stdout",data="%s"}' % self.hexencode(msg)) elif eventType == lldb.SBProcess.eBroadcastBitSTDERR: msg = self.process.GetSTDERR(1024) - self.report('output={channel="stderr",data="%s"}' - % self.hexencode(msg)) + if msg is not None: + self.report('output={channel="stderr",data="%s"}' % self.hexencode(msg)) elif eventType == lldb.SBProcess.eBroadcastBitProfileData: pass