Jon*_*len 4 android xamarin.android
有没有办法为MonoDroid创建全局错误处理程序?我的调试器坏了所以我需要一种方法来查看应用程序崩溃时的异常信息.
看来这AndroidEnvironment.UnhandledExceptionRaiser
就是你要找的东西:
//that's a dirty-code example, do not use as-is! :)
AndroidEnvironment.UnhandledExceptionRaiser += (sender, args) =>
{
File.AppendAllText("tmp.txt", args.Exception.ToString());
};
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1602 次 |
最近记录: |