title: Debugging native libraries for Android OS
body: <p>I am to create a shared library for Android OS. Although I have done some Android apps in Eclipse I decided to start my native development with Visual Studio and vs-Android add-on:</p>
  
  <p><a href="http://code.google.com/p/vs-android/">http://code.google.com/p/vs-android/</a></p>
  
  <p>I am really familiar with VS and Google found that add-on as one of the first results. I have gone through the whole setup procedure, installed JDK, NDK, Ant, set system variables and finally got a working project. It works like a charm! But there is a BIG drawback. I am not able to debug the native code. </p>
  
  <p>I know there is NDK-GDB tool, but I am constantly failing when trying to setup it. I have read NDK-GDB.html document, threw away the initial vs-Android solution and successfully gone through the following tutorial:</p>
  
  <p><a href="http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/">http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/</a></p>
  
  <p>but now I am stuck again when trying to go through the:</p>
  
  <p><a href="http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/">http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/</a></p>
  
  <p><a href="http://mhandroid.wordpress.com/2011/01/23/using-cgdb-with-ndk-debug-and-cgdb-tutorial/">http://mhandroid.wordpress.com/2011/01/23/using-cgdb-with-ndk-debug-and-cgdb-tutorial/</a></p>
  
  <p>I also tried WinGDB - just imported working Eclipse project containing both native and Java code, but it doesn't even compile.</p>
  
  <p>In short, there are many pieces of the puzzle, but I am still missing some of them. I am afraid that I am missing the whole idea of debugging code with a command line tool like NDK-GDB is. </p>
  
  <p>Can someone provide me some explanation and clear steps how to debug native libraries (doesn't matter if with vs-android or Eclipse or whatever else)? Please be aware I am not a Linux guru and also not familiar with cygwin or gdbserver.</p>