How to set C++ breakpoint in Eclipse Android Native Development Kit (NDK)?
android, android-emulator, android-ndk, breakpoints, c++
Solution
You can't set a C++ breakpoint while debugging Java. You need to run `Debug As > Android Native Application`. In Eclipse, a hittable breakpoint has a tick.
In order to debug as Android native application, your application needs to have `Native Support`, you need to have the `CDT plugin` and you shoud add `NDK_DEBUG=1` in the build command.
More info here.
Problem
I'm trying to port a Linux C++ application to Android using the Android Native Development Kit (NDK). Thus far, I have my ported application running on an emulator on my Mac. I tried setting a break point in Eclipse in my C++ code at a particular line, but the code runs through my breakpoint without stopping. The java breakpoints on a line work fine, it is just the C++ breakpoints that seem to have no effect and the code just runs as written and returns. How can I set a breakpoint in my C++ code so that I can step through the native code in my Android application under development in an emulator?