使用 MonoAndroid 的 VS 中未处理的异常信息
我正在尝试使用 Android 模拟器和 VS 来玩。
我已经从 Mono 官方网站下载了 GLTriangle20 示例并尝试运行它。然而它落在了 CreateFrameBuffer(); 处。 Visual Studio 用绿色突出显示该行,暂停解包器,但不显示有关此异常的任何信息。
我什至尝试将这一行包装到 try/catch 中,但它没有捕获任何内容。 VS 只是在那条线上停下来,除了绿色突出显示之外什么也没说。看起来像这样:
我昨天下载了 JDK、Mono 和 Android SDK,所以所有这些工具都是新鲜的
I'm trying to play with Android emulator and VS.
I've downloaded the GLTriangle20 example from the Mono official site and tried to run it. However it fell at CreateFrameBuffer();
Visual Studio highlights this line with green, pauses the debagger but doesn't show any information about this exception.
I even tried to wrap this line into try/catch, but it doesn't catch anything. VS just stops on that line and says nothing except green highlight. It looks like that:
I downloaded JDK, Mono, and Android SDK yesterday, so all these tools are fresh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试在不调试的情况下运行 (Ctrl-F5) 并检查 Android 日志是否存在异常:
https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/android_debug_log/
Try running without debugging (Ctrl-F5) and check the Android log for the exception:
https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/android_debug_log/
查看此解决方案以向应用程序未处理的事件添加处理程序:https://stackoverflow.com/a/32755558/1282432
我唯一不喜欢它的是它需要放入每个活动中 - 或者你创建一个基类 - 我不能这样做,因为我正在使用MVVMCross……
如果有一个application.unhandledexception就好了,不过我还没找到……
Check out this solution to add a handler to the app unhandled event: https://stackoverflow.com/a/32755558/1282432
Only thing I don't like about it is it needs to be put into every activity - or you create a base class - which I can't do because I'm using MVVMCross......
It would be nice if there was ONE application.unhandledexception, but I haven't found it yet...