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. Waiting for the debugger to attach
Forum Updated to NodeBB v4.3 + New Features

Waiting for the debugger to attach

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
9 Posts 4 Posters 1.7k Views 1 Watching
  • 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.
  • SeDiS Offline
    SeDiS Offline
    SeDi
    wrote on last edited by SeDi
    #1

    When starting an actual debug run (e.g. with F5, not just debug cofiguration run with Ctrl-R) on my Android device, my app opens a notification that says: "Waiting for debugger - Application testLogCompat (process org.qtproject.example.testLogCompat is waiting for the debugger to attach" whith the only option to "Force close".
    Debugger.png
    It stays that way until I click the button.

    Meanwhile my Application Output pane shows

    killall: lldb-server: No such process
    
    01:28:49: Debugging  "-qmljsdebugger=port:51710,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation" ...
    CONNECT: success adb://NB1GAS5781601160:5039 platform: remote-android True01:30:34: Debugging of  "-qmljsdebugger=port:51710,block,services:DebugMessages,QmlDebugger,V8Debugger,QmlInspector,DebugTranslation" has finished.
    

    After force-closing I only get:

    01:30:35: 
    
    "org.qtproject.example.testLogCompat" died.
    

    NB that no qDebug()<<"output"; appears, although there should be something.
    It is most probably linked with the problem here: https://forum.qt.io/topic/157820/no-qdebug-output-on-android?_=1721502550522
    (seeing no output on a normal debug configuration run with Ctrl-R).

    The problem occurs in new projects and across different Qt Versions.
    It does, although, not appear on another person's Android device (Samsung Tablet SM-T830 with Android 10).
    Both devices have worked before at my desktop computer at home, but now, travelling, I can't for the life of me get debugging done on my mobile (Nokia 8, TA-1012 with Android 9) where I need it. I had to update QtCreator on my laptop to get Android working at all.

    I have tried:

    • toggling DeveloperOptions|Debugging-App between none and my app
    • toggling GPU-Debugging
    • deleting USB authorisations and granting them again
    • removing DeveloperOptions altogether and bring them back on
    • adb shell am clear-debug-app
    • uninstalling app before deploying again
    • removing build folders

    I have no idea why it works on one device and not on the other, while both worked fine at home. Might it be a device info cache problem in QtCreator? Is there a way to reset that? Any other ideas?

    Win 10 laptop, Qt Creator 13.0.2, deploying to a Nokia 8 (TA-1012) with Android 9, several Qt versions.

    1 Reply Last reply
    0
    • SeDiS SeDi referenced this topic on
    • Axel SpoerlA Axel Spoerl moved this topic from Installation and Deployment on
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote on last edited by
      #2

      Which NDK/SDK version are you running? Is it a supported one?
      If that's the case, I suggest to file a CREATORBUG.
      Please go to View->Views and select "Debugger Log". Attach the output (it's quite verbose) to the ticket.

      Software Engineer
      The Qt Company, Oslo

      SeDiS 1 Reply Last reply
      1
      • SeDiS Offline
        SeDiS Offline
        SeDi
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • Axel SpoerlA Axel Spoerl

          Which NDK/SDK version are you running? Is it a supported one?
          If that's the case, I suggest to file a CREATORBUG.
          Please go to View->Views and select "Debugger Log". Attach the output (it's quite verbose) to the ticket.

          SeDiS Offline
          SeDiS Offline
          SeDi
          wrote on last edited by
          #4

          @Axel-Spoerl
          Thanks for your answer, Axel!

          I had let QtCreator take care of Android stuff installing, so it is, as to be expected, an explicitly supported SDK/NDK (26.1.10909125 as default) with JDK17, see attached screenshot.
          sdkndk.png
          There are two log windows when I summon "Global Debugger Log". The left one is shorter. Both stop producing text while the app waits for the debugger. After pressing the "Force Quit" button, the left log becomes only three lines longer ("Debugger finished.|Run failed.|Debugger finished.") I would have expected that.

          Unexpectedly, the right log window's text behaves somewhat interesting. It is not just adding text at the end after force-quitting, but there are significant changes far earlier in the log's text, e.g. it has an insertion from line 235 to 284. That seems to me somewhat counterintuitive, regarding my understanding of a logfile. Bug or concept?

          I can't cite the logs here, they are too long. I've uploaded them here:
          -- Log files --

          Which one(s) should I attach to the CREATORBUG?

          Kind regards
          Sebastian

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

            The left one is just the input to the debugger (plus a bit), the right one is input plus output (plus a bit). The right one is the interesting one

            1 Reply Last reply
            1
            • SeDiS Offline
              SeDiS Offline
              SeDi
              wrote on last edited by SeDi
              #6

              Thanks!
              I've created QTCREATORBUG-31277.
              I hope it's ok, it is my first time to file such a bug.
              I've just seen similar bug reports for older versions, most of them uncared for, so this didn't really raise my hopes. Any ideas how to work around? Is there something like a device info cache in QtCreator that could be emptied?

              1 Reply Last reply
              0
              • cristian-adamC Offline
                cristian-adamC Offline
                cristian-adam
                wrote on last edited by
                #7

                I have worked on the android debugger in Qt Creator 13 issue regarding breakpoints not being hit, and that it was showing dissasembly.

                The Android ecosystem is very large and diverse. There are many Android versions, many NDK versions, many OEM manufactures.

                I have done the Android work on a MacBook Pro M1 using a native arm64 emulator. Everything worked out of the box. No weird issues, and everything super fast.

                You are trying to get something working on a Nokia 8, TA-1012 with Android 9, which is something rather old (first announced in 2018). According to https://endoflife.date/android the currently minimum supported Android version is 12.

                Here is a search of a Android 12 phone made by Samsung, Google, Nokia, Motorolla. You can have a device starting with 75€.

                I think it's way faster to get a supported Android device and develop for it, than trying to figure out why the latest Qt and Android NDK software is not working on a unsupported device.

                SeDiS 1 Reply Last reply
                3
                • cristian-adamC Offline
                  cristian-adamC Offline
                  cristian-adam
                  wrote on last edited by
                  #8

                  I've updated https://bugreports.qt.io/browse/QTCREATORBUG-31277 with some information from my side.

                  I assume it's something that gets jdb confused and therefore the debugger settling is not happening.

                  1 Reply Last reply
                  1
                  • cristian-adamC cristian-adam

                    I have worked on the android debugger in Qt Creator 13 issue regarding breakpoints not being hit, and that it was showing dissasembly.

                    The Android ecosystem is very large and diverse. There are many Android versions, many NDK versions, many OEM manufactures.

                    I have done the Android work on a MacBook Pro M1 using a native arm64 emulator. Everything worked out of the box. No weird issues, and everything super fast.

                    You are trying to get something working on a Nokia 8, TA-1012 with Android 9, which is something rather old (first announced in 2018). According to https://endoflife.date/android the currently minimum supported Android version is 12.

                    Here is a search of a Android 12 phone made by Samsung, Google, Nokia, Motorolla. You can have a device starting with 75€.

                    I think it's way faster to get a supported Android device and develop for it, than trying to figure out why the latest Qt and Android NDK software is not working on a unsupported device.

                    SeDiS Offline
                    SeDiS Offline
                    SeDi
                    wrote on last edited by SeDi
                    #9

                    @cristian-adam Thank you very much for your help! You are right, of course, regarding the phone's age. But still, the phone is well debuggable on a different computer. That's puzzling me (plus I am travelling right now and cannot just order one).

                    I probably don't understand a tenth of what you do, but afai can see in the logs, jdb is never being called for the not-working device. There seems to be one inconsistency in the order of responses to commands at that time between the devices.

                    If it at least would print out the qDebug()<<"messages", then I could work for the remaining time of my journey :-\

                    I'd love to figure that out, but I can understand, if you regard this not to be worth the time and effort.

                    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