Search code examples
androidxamarinxamarin-android-player

Xamarin Android Exception causes "Frame not in module"


I am new to Xamarin and currently developing my first app with Android.

I have deliberately created an exception as follows:

throw new Exception("Whoops");

When I hit this line, the Emulator does not give any indication that there has been a problem. If I set a breakpoint on the above line in Visual Studio and then step over it, I get the following error:

Frame not in module The current stack frame was not found in a loaded module.

How can I get Visual Studio to tell me exactly what went wrong? At the moment I can't find any trace of the exception.


Solution

  • This link told me what I needed to know: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/android_debug_log/

    You just go to View > Other Windows > Android Device Logging from within Visual Studio. I found it best to use text view.

    If there is a better way then please let me know though.