Important: Please read the Qt Code of Conduct -

Breakpoints not working on android deployed app

  • Breakpoints set in QtCreator are never hit when I deploy my app to my Samsung Galaxy Tab. To simplify things I just tried using the Examples/androidextras/notification example to simplify things.

    I've already checked the following:

    • Debugger is set to arm-linux-androideabi-gdb
    • Update ndk and sdk
    • I am running a debug build
    • Deploy works
    • I get qDebug output in QT Creator
    • I'm connected via usb
    • Running Qt 5.4
    • Running on OSX

    Any hints on other things I should look for to try to figure this out?

  • I'll answer my own question. The tablet needs to be rooted in order to set breakpoints in native code.

  • I am sorry to necrobump such an old topic, but I am facing exactly the same issue. Breakpoints in QtCreator are being ignored when debugging an Android application. Starting the application with breakpoints yields no reaction. Setting breakpoints while the app is running yields an error message about gdb being unresponsive.

    The Application Output looks quite reasonable, at the beginning I see the following lines:

    I Qt JAVA : DEBUGGER: Waiting for debug socket connect
    I Qt JAVA : DEBUGGER: go to sleep
    I Qt JAVA : DEBUGGER: Waiting for debug socket connect
    I Qt JAVA : DEBUGGER: go to sleep
    I Qt JAVA : DEBUGGER: Incoming socket OK
    I Qt JAVA : DEBUGGER: Got pid acknowledgment
    I Qt JAVA : DEBUGGER: ping not requested
    I Qt JAVA : DEBUGGER: pong not requested

    Is it still necessary to root devices for debugging?

  • You need to make sure your app waits for the debugger. That's a setting in Android. Only one app can be debugged, and this app has to be explicitely specified (Debug app or similar; I forgot the exact text). I do remember that the text of that setting made me believe I'm going to set up the debugger to use, which is not the case. It's to tell Android which app you'd like to debug.

    Of course the app needs to be in debug mode and and and.

    In my case the app just ran off before the debugger (qdb) had a chance to catch up.

Log in to reply