Unhandled Exception Handling in iOS, Android and Windows with Xamarin.Forms

Unhandled exceptions are hard to catch and log, and you must do it to be able to handle the errors in your app. One approach is to use Xamarin.Insights but you always want to be able to just log into a file and then access that file locally.The code below is what we use right now and it has helped us a lot, especially the unobserved task exceptions that are just silent, i.e. they do not crash the app, but you still want to handle the exceptions.

Launch Visual Studio. Select File, New, Project...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

The source code is located on my GitHub site (wpbest/UnhandledExceptionHandling): https://github.com/wpbest/UnhandledExceptionHandling.git

No Comments

Add a Comment

As it will appear on the website

Not displayed

Your website