Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cannot debug calqatr on Android
Forum Updated to NodeBB v4.3 + New Features

Cannot debug calqatr on Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
13 Posts 5 Posters 4.0k 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.
  • M Mitmischer

    @jsulm Hmm, looking at the logs you are absolutely right - so this has nothing to do with MinGW at least..

    Note that I can actually debug Java stuff from Android Studio. I can also halt threads there. But that is not useful as I need the breakpoints in Qt Creator.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #4

    @Mitmischer Did you check your Android Kit - is debugger set up properly?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mitmischer
      wrote on last edited by
      #5

      @jsulm The kits were auto-detected by Qt Creator - You can find the configuration below:

      1_1528281555559_settings2.PNG 0_1528281555557_settings1.PNG

      jsulmJ J.HilkJ 2 Replies Last reply
      0
      • M Mitmischer

        @jsulm The kits were auto-detected by Qt Creator - You can find the configuration below:

        1_1528281555559_settings2.PNG 0_1528281555557_settings1.PNG

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #6

        @Mitmischer Just to be sure: you're building in Debug mode?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Mitmischer

          @jsulm The kits were auto-detected by Qt Creator - You can find the configuration below:

          1_1528281555559_settings2.PNG 0_1528281555557_settings1.PNG

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #7

          @Mitmischer
          just a couple of points to also check

          • have you enabled usb-debugging on your Android device?
          • do you use an at least 4 wire cable -> make sure you can access the filesystem of the android device from your pc
          • have you confirmed the trustworthiness of your pc on the device
          • have you installed the Google USB Driver together with the other SDK - packages?

          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Mitmischer
            wrote on last edited by Mitmischer
            #8

            @jsulm Yes, I am building in debug mode. Also on the phone, USB debugging etc. is activated. I mean, I can build the Qt app on Desktop with debugging and I can build Android Java apps on the phone with debugging (using Android studio) - it's only the combination of Qt app and Android that I cannot debug.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Mitmischer
              wrote on last edited by
              #9

              @jsulm @J-Hilk USB-debugging is enabled and I can copy and read files from the PC to the phone. I installed a SAMSUNG USB driver, I hope that one is sufficient: I can control the phone by adb. What bothers me most is that I can attach to a running Qt app using Android Studio, so it looks to me that QtCreator is missing something or is not connecting properly. Sadly, debugging Qt Android apps with Android Studio is not useful..

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Mitmischer
                wrote on last edited by Mitmischer
                #10

                Ok, I got news - maybe the connection itself is not at fault. I noted that I can pause the application from QtCreator. Pausing is successful as the app is unresponsive during the pause and it continues running afterwards. But in the pause, QtCreator gives me some disassembled code, no source code. Also, the stack trace consists of two lines of ??, that looks like missing debug information to me. What's more, if I try to jump to a line, I get the error message "[...] No symbol table loaded.". But I am definitely running a debug build as indicated in the configuration in the bottom left. The QML profiler is working absolutely fine. And still, if I activate "Wait for debugger" on the phone, I see the message "Failed to contact debugging port." on the phone. Something's fishy :|

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tseg
                  wrote on last edited by
                  #11

                  @Mitmischer this is the exact problem we are having, all the same things we've tried as well. Did you find a solution? Thanks!

                  J.HilkJ 1 Reply Last reply
                  0
                  • T tseg

                    @Mitmischer this is the exact problem we are having, all the same things we've tried as well. Did you find a solution? Thanks!

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #12

                    @tseg actually, seeing the date of this thread, I have a guess what may be the case here,

                    What version of Qtcreator are you using ? Haven‘t tried it with the newset, 4.7 one yet, but the android debugger kind of broke after 4.6, try it with a version prior\including to 4.6


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      TheTux
                      wrote on last edited by
                      #13

                      Hi guys,
                      I'm a a bit late to the party, but I was having the exact same issue and just spent few hours working this out.

                      Running Qt Creator 4.7.1
                      What you probably figured out is that gdb fails to load the debug symbols. First tricky thing, Qt Creator doesn't raise any error about it, you have to dig down the gdb logs:

                      dINFERIOR STARTUP: BINARY NOT FOUND
                      sReading debug information failed:
                      s/home/flr03/Workspace/ethan-qt-epg-app/build-epg-ui-EPG_Android_for_armeabi_v7a_GCC_4_9_Qt_5_10_1_5_10_1_AndroidQt-Debug/app_process: No such file or directory.
                      

                      So from this, I checked if the deploy step does its job properly, second surprise Qt Creator tries indeed to pull app_process but doesn't complain about anything, however the file is not pulled properly (others needed files seem to be pulled properly though).
                      As I can pull manually app_process from the terminal with adb, I work around the issue by adding a custom deploy step (Project/Run settings) doing that for me. Et voilà.

                      Hope maybe this can help someone else being blocked with the same issue.

                      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