Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't Debug: Qt5.5.1 LLDB on OSX
Forum Updated to NodeBB v4.3 + New Features

Can't Debug: Qt5.5.1 LLDB on OSX

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 2.2k 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.
  • RaychaserR Offline
    RaychaserR Offline
    Raychaser
    wrote on last edited by
    #1

    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:

    1. Create a new default console app. Just the standard template one. Nothing fancy.
    2. Set a breakpoint inside main()
    3. Make sure you're on debug mode.
    4. 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?

    1 Reply Last reply
    0
    • andrA Offline
      andrA Offline
      andr
      wrote on last edited by
      #2

      Console + LLDB is simply not implemented yet. Switch off 'Run in Terminal' in your project's Run settings, and it should work.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sandy.martel23
        wrote on last edited by
        #3

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