This article only applies to ANDROID-NDK-R8 & E CLIPSE-ADT-20 and later versions.
1. Configure project properties, enable compilation and debugging: ndk-build NDK_DEBUG=1
2. Right-click the project, select DEBUG AS->Android Native Application
It is worth noting that after starting debugging, it is best to wait until Eclipse automatically switches to Debug Perspective before starting debugging.
Reprinted from: http://my.oschina.net/erehmii/blog/157665