The Xamarin debugger can only debug managed (i.e. C #) code. Breakpoints only work with the Xamarin debugger if the debugged project is a managed project. They do not work if the project is a native or native library.
The Microsoft debugger can only debug its own (for example, C / C ++) code. Breakpoints work only with the Microsoft debugger if the debugged project is a native application or its own library or if it is connected to an already running Android process.
To get gdbserver into the application package, you either need to reference your own code library from the managed application, or enable it (with the assembly action installed in AndroidNativeLibrary). I found that you can also add a link to gdbserver (again, with the build action installed in AndroidNativeLibrary) from the project, and use path sniffing to select gdbserver from the corresponding ABI. Project file fragment:
<ItemGroup> <AndroidNativeLibrary Include="$(ANDROID_NDK_ROOT)\prebuilt\android-arm\gdbserver\gdbserver"> <Link>lib\armeabi-v7a\gdbserver</Link> </AndroidNativeLibrary> </ItemGroup>
Also see my answer to a similar question .
Richard Walters
source share