I\'m looking for a way to easily debug C code in an Android NDK application using Eclipse. I\'ve read ways to debug the app using gdb or something similar but what I want i
ADT 20 includes an NDK plugin that provides support for building and debugging NDK projects in Eclipse. This document describes how to install and use the NDK plugin. Instructions are pretty straightforward and consist of only a few steps.
This is the simplest solution I found and it worked for me.
Note: If you are using ADT bundle you only need to install C development tools with install new software (see the screenshot) and you can go to "Using the NDK plugin" part immediately.
Edit: It seems there is an issue with CDT in eclipse juno http://code.google.com/p/android/issues/detail?id=33788 causing eclipse's debugger to be unable to find breakpoints.
Workaround I used is to start app in debug mode (not debug as native app but 'regular' debug) and then in command line I went to my project root and typed ndk-gdb (this creates gdb.setup file in obj/local/armeabi folder). After that breakpoints worked as usual.
In comments related to the issue on the link above they suggest some other workarounds but I didn't try them since they seemed to require more effort than this.