Is it possible to debug an Android library used by a Xamarin.Android binding project?

I wrote Java code that I compiled to AAR from Android Studio that I need to use in a Xamarin.Android application. I did this by following the instructions here to create a binding library for my Java code.

Now I would like to step into Java code to investigate the problem. Is it possible to do this from Visual Studio or Android Studio? Thank.

edit: For example, is there any way I can connect the Android Studio debugger to my application? It calls the code in AAR, but I'm not sure Android Studio will know where to look for AAR sources for debugging.

+3


source to share


1 answer


Nice, the answer is yes, and it couldn't be easier to do. Once you start debugging from Visual Studio, go to your Android Studio project and click this button:



A dialog box appears asking which process you want to connect to. Make sure you have Show All Processes and you will be able to see it corresponding to your application.

Once you attach to your application, you can set breakpoints in Java code and make them work like magic.

+2


source







All Articles