How to debug native code in an Android library project?

18,602

Try the answer by Jay in my question: debug native code in Android library. I had no time to test it by my self, but it looks promising. Let me know if it works.

Share:
18,602
znat
Author by

znat

Updated on July 20, 2022

Comments

  • znat
    znat almost 2 years

    I am developing an Android library with native code. This library project is added as a library in an application project.

    I would like to debug the library when the application project is using it.

    I am pretty sure the settings in the library (makefiles, build command, compiler options) project are ok because I tried the debugger from within the library (I created a dummy Activity and unset "library") and it worked. I am also aware of the delay that might occur because of the time needed to load the dynamic library and I don't think it's the issue for the same reason.

    In the Application project, I just added native code support set the build command as ndk_build NDK_DEBUG=1, but it never stops at breakpoints. Any idea would be greatly appreciated

  • marioc64
    marioc64 over 9 years
    How it works for you? When I create new "Android Native Application" debug configuration and choose "Browse" for project, the application project nor the library project (that with native code) is shown on the list.