Android MonoDroid:全局错误处理程序

Android MonoDroid:全局错误处理程序,android,xamarin.android,Android,Xamarin.android,有没有办法为MonoDroid创建全局错误处理程序?我的调试器已损坏,因此我需要一种在应用程序崩溃时查看异常信息的方法 大多数(全部?)未处理的异常应在Android调试日志中结束: 请看我的项目,它可以处理和提交错误信息 您正在寻找的似乎是AndroidEnvironment.UnhandledExceptionRaiser: //that's a dirty-code example, do not use as-is! :) AndroidEnvironment.UnhandledExce

有没有办法为MonoDroid创建全局错误处理程序?我的调试器已损坏,因此我需要一种在应用程序崩溃时查看异常信息的方法

大多数(全部?)未处理的异常应在Android调试日志中结束:


请看我的项目,它可以处理和提交错误信息

您正在寻找的似乎是
AndroidEnvironment.UnhandledExceptionRaiser

//that's a dirty-code example, do not use as-is! :)
AndroidEnvironment.UnhandledExceptionRaiser += (sender, args) =>
                {
                    File.AppendAllText("tmp.txt", args.Exception.ToString());
                };