I recently started to learn mobile development using Xamarin Android. I am using VS 2012. I noticed that when I open an android project that all exceptions under Debug -> Exceptions are unchecked. I thought that is the reason that exceptions thrown in code are not shown in a way to which I am used to from desktop development. When I checked the exceptions in Debug->Exceptions window and tried to deploy the solution to the emulator it failed - there were no errors but the application does not start on the emulator.
So my question is: Is that normal behavior when developing for Android using VS 2012 or VS 2010 and the emulator? Is there any way to see the thrown exceptions in a 'normal way' not just in output window. Would that change if I used an actual Android device for debugging?
I was able to dig into Unhandled exception:
Proceed following:
AppDomain.CurrentDomain.UnhandledException
ExceptionObject
property it should give you very clear message what is wrong with app. In my case it gave me very clear message that I am not calling baseOnDestroyView
in myFragment
In the
Debug --> Exceptions
dialog box, if you click theThrown
checkbox forCommon Language Runtime Exceptions
you will get a more meaningful description of the exception to be resolved.Obviously the other big thing is clicking the Break button and seeing what is on the call stack.
I'm new to Xamarin as well. The simple answer is no this is not what you should expect.
If I get an exception when the application is running on the device it breaks in Visual Studio. Best bet is to contact Xamarin direct or go on there forums.
My Answer Is NO
Why?
Explation From
also you could catch the unhadled exception from app Like this
Create a base activity like name ErrorActivity
look at this example
In error handler class
Now you could inherit the all activitys from ErrorActivity like this
Now you can handled the error in app..So you get the error log from log File.. or android device logging monitor..Hope this helps...