[英]Visual Studio 2015 Xamarin.Forms PCL Android debugging - Blank exception, no Callstack, no Locals
I have created a new Blank App (Xamarin.Forms Portable) project in Visual Studio 2015 and modified App.cs to always throw an exception:我在 Visual Studio 2015 中创建了一个新的空白应用程序(Xamarin.Forms Portable)项目并修改 App.cs 以始终抛出异常:
public class App : Application
{
public App()
{
// The root page of your application
MainPage = new ContentPage
{
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children = {
new Label {
XAlign = TextAlignment.Center,
Text = "Welcome to Xamarin Forms!"
}
}
}
};
throw new Exception("Exception");
}
When I debug it in Visual Studio Emulator for Android, or in physical Android device the debugger stops on the exception, but that is all.当我在 Visual Studio Emulator for Android 或物理 Android 设备中调试它时,调试器在异常时停止,但仅此而已。 No exception details are available, no call stack, no locals, nothing:
没有可用的异常详细信息,没有调用堆栈,没有本地人,什么都没有:
However, when I debug it in Windows Phone emulator, everything works as it should be:但是,当我在 Windows Phone 模拟器中调试它时,一切正常:
Is that normal behavior?这是正常行为吗? How to get exception details, call stack, locals... etc?
如何获取异常详细信息、调用堆栈、本地人...等?
Any ideas?有任何想法吗?
I am using Visual Studio 2015 RTM, Windows 8.1 Enterprise 64-bit.我使用的是 Visual Studio 2015 RTM、Windows 8.1 Enterprise 64 位。
This worked for me:这对我有用:
Debug -> Windows -> Exception Settings调试 -> Windows -> 异常设置
Check "Common Language Runtime Exceptions."选中“公共语言运行时异常”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.