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. Qt Debugger for Android ignores breakpoints
Forum Updated to NodeBB v4.3 + New Features

Qt Debugger for Android ignores breakpoints

Scheduled Pinned Locked Moved Mobile and Embedded
breakpointandroidmobileqt creatordebugger5.5
5 Posts 2 Posters 3.3k 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.
  • J Offline
    J Offline
    jimbo202
    wrote on 18 Aug 2015, 16:31 last edited by
    #1

    I've done a lot of searching around on the internet and have tried all the proposed remedies but my environment still ignores breakpoints.

    • I've made sure i'm in debug mode in the side column menu
    • I've added CONFIG += qt debug to my .pro file
    • I've cleaned the project, rebuilt, and ran qmake multiple times

    But no matter where I set a breakpoint, even if it's in main.cpp, the debugger WILL NOT pause on any breakpoints.

    Anyone have any suggestions?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SeeLook
      wrote on 18 Aug 2015, 17:24 last edited by
      #2

      I've just debugged. It should work.
      Check is compile message contains -O0 or -O1 flag (instead of -O2) then add it to CXX flags if not.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jimbo202
        wrote on 18 Aug 2015, 18:08 last edited by jimbo202
        #3

        I don't seem to have either of those. Below is my compile output

        11:01:07: Running steps for project HostSim_Android...
        11:01:07: Configuration unchanged, skipping qmake step.
        11:01:07: Starting: "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe"
        makefile:1025: warning: overriding recipe for target 'moc_androidBLEwrapper.cpp'
        makefile:902: warning: ignoring old recipe for target 'moc_androidBLEwrapper.cpp'
        C:\Qt\5.5\android_armv7\bin\qmake.exe -spec android-g++ "CONFIG+=debug" -o Makefile ..\HostSim_Android.pro
        Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
        Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.
        Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned!
        mingw32-make: Nothing to be done for 'first'.
        11:01:10: The process "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" exited normally.
        11:01:10: Removing directory C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build
        11:01:10: Starting: "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" INSTALL_ROOT="C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build" install
        copy /y libHostSim.so C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\libs\armeabi-v7a\libHostSim.so
        1 file(s) copied.
        11:01:10: The process "C:\Qt\Tools\mingw491_32\bin\mingw32-make.exe" exited normally.
        11:01:10: Starting: "C:\Qt\5.5\android_armv7\bin\androiddeployqt.exe" --input C:/Users/LaneJ02/Documents/Projects/ICM_BLE_PROXY_WIP/bleproxy-sw/HostSimulators/build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-libHostSim.so-deployment-settings.json --output C:/Users/LaneJ02/Documents/Projects/ICM_BLE_PROXY_WIP/bleproxy-sw/HostSimulators/build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build --deployment bundled --android-platform android-22 --jdk "C:/Program Files/Java/jdk" --ant C:/apache-ant-1.9.5/bin/ant.bat
        Generating Android Package
        Input file: C:/-----my path------/build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-libHostSim.so-deployment-settings.json
        Output directory: C:/------my path-----/build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build/
        Application binary: C:/------my path-----//build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/libHostSim.so
        Android build platform: android-22
        Install to device: No
        Buildfile: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\build.xml

        -set-mode-check:

        -set-debug-files:

        -check-env:
        [checkenv] Android SDK Tools Revision 24.3.0
        [checkenv] Installed at C:------my path-----/\AppData\Local\Android\android-sdk

        -setup:
        [echo] Project Name: QtApp
        [gettype] Project Type: Application

        -set-debug-mode:

        -debug-obfuscation-check:

        -pre-build:

        -build-setup:
        [getbuildtools] Using latest Build Tools: 22.0.1
        [echo] Resolving Build Target for QtApp...
        [gettarget] Project Target: Android 5.1.1
        [gettarget] API level: 22
        [echo] ----------
        [echo] Creating output directories if needed...
        [mkdir] Created dir: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin
        [mkdir] Created dir: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\res
        [mkdir] Created dir: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\rsObj
        [mkdir] Created dir: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\rsLibs
        [mkdir] Created dir: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\gen
        [mkdir] Created dir: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\classes
        [mkdir] Created dir: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\dexedLibs
        [echo] ----------
        [echo] Resolving Dependencies for QtApp...
        [dependency] Library dependencies:
        [dependency] No Libraries
        [dependency]
        [dependency] ------------------
        [echo] ----------
        [echo] Building Libraries with 'debug'...
        [subant] No sub-builds to iterate on

        -code-gen:
        [mergemanifest] Merging AndroidManifest files into one.
        [mergemanifest] Manifest merger disabled. Using project manifest only.
        [echo] Handling aidl files...
        [aidl] Found 2 AIDL files.
        [aidl] Compiling 2 AIDL files.
        [echo] ----------
        [echo] Handling RenderScript files...
        [echo] ----------
        [echo] Handling Resources...
        [aapt] Generating resource IDs...
        [echo] ----------
        [echo] Handling BuildConfig class...
        [buildconfig] Generating BuildConfig class.

        -pre-compile:

        -compile:
        [javac] Compiling 7 source files to C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\classes
        [javac] Note: C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\src\org\qtproject\qt5\android\bindings\QtActivity.java uses or overrides a deprecated API.
        [javac] Note: Recompile with -Xlint:deprecation for details.

        -post-compile:

        -obfuscate:

        -dex:
        [dex] input: C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\classes
        [dex] input: C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\libs\QtAndroid-bundled.jar
        [dex] input: C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\libs\QtAndroidAccessibility-bundled.jar
        [dex] Pre-Dexing C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\libs\QtAndroid-bundled.jar -> QtAndroid-bundled-f556b2a848d31a13e0a9a2c60033f770.jar
        [dex] Pre-Dexing C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\libs\QtAndroidAccessibility-bundled.jar -> QtAndroidAccessibility-bundled-379c97d0ec6a642147927d016fd5d905.jar
        [dex] Converting compiled files and external libraries into C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\classes.dex...
        [dx] Merged dex A (24 defs/45.3KiB) with dex B (55 defs/114.9KiB). Result is 79 defs/188.0KiB. Took 0.1s
        [dx] Merged dex A (79 defs/188.0KiB) with dex B (5 defs/10.4KiB). Result is 84 defs/239.8KiB. Took 0.0s

        -crunch:
        [crunch] Crunching PNG Files in source dir: C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\res
        [crunch] To destination dir: C:-------my-path--------------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\res
        [crunch] Crunched 0 PNG files to update cache

        -package-resources:
        [aapt] Creating full resource package...

        -package:
        [apkbuilder] Current build type is different than previous build: forced apkbuilder run.
        [apkbuilder] Creating QtApp-debug-unaligned.apk and signing it with a debug key...

        -post-package:

        -do-debug:
        [zipalign] Running zip align on final apk...
        [echo] Debug Package: C:-------my-path--------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\QtApp-debug.apk
        [propertyfile] Creating new property file: C:\Users-------my-path\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\build.prop
        [propertyfile] Updating property file: C:\Users-------my-path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\build.prop
        [propertyfile] Updating property file: C:--------my path-------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\build.prop
        [propertyfile] Updating property file: C:-----my--path------\build-HostSim_Android-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug\android-build\bin\build.prop

        -post-build:

        debug:

        BUILD SUCCESSFUL
        Total time: 10 seconds
        Android package built successfully in 15.337 ms.
        -- File: C:/Users/----------------------------------MY_path_ Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_0-Debug/android-build//bin/QtApp-debug.apk
        11:01:26: The process "C:\Qt\5.5\android_armv7\bin\androiddeployqt.exe" exited normally.
        11:01:26: Elapsed time: 00:19.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SeeLook
          wrote on 18 Aug 2015, 18:24 last edited by
          #4

          You need to rebuild or change something in code to see that.
          Anyway, try to add those lines to .pro:

          QMAKE_CXXFLAGS_DEBUG -= -O2
          QMAKE_CXXFLAGS_DEBUG -= -O3
          QMAKE_CXXFLAGS_DEBUG += -O0
          

          and rebuild

          J 1 Reply Last reply 20 Aug 2015, 16:47
          0
          • S SeeLook
            18 Aug 2015, 18:24

            You need to rebuild or change something in code to see that.
            Anyway, try to add those lines to .pro:

            QMAKE_CXXFLAGS_DEBUG -= -O2
            QMAKE_CXXFLAGS_DEBUG -= -O3
            QMAKE_CXXFLAGS_DEBUG += -O0
            

            and rebuild

            J Offline
            J Offline
            jimbo202
            wrote on 20 Aug 2015, 16:47 last edited by
            #5

            added them in rebult and ran qmake, then attempted it again. Breakpoints are still being ignored.

            1 Reply Last reply
            0

            4/5

            18 Aug 2015, 18:24

            • Login

            • Login or register to search.
            4 out of 5
            • First post
              4/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved