This introduction to the Android NDK would not be complete without approaching some more advanced topics: debugging and troubleshooting code. Indeed, C/C++ are complex languages that can fail in many ways.
I will not lie to you: NDK debugging features are rather rubbish yet. It is often more practical and fast to rely on simple log messages. This is why debugging is presented in this last chapter. But still, a debugger can save quite some time in complex programs or even worse... crashing programs! But even in that case, there exist alternative solutions.
More specifically, we are going to discover how to do the following: