Visual Studio 2015 Xamarin.Forms PCL Android 调试 - 空白异常,无调用堆栈,无局部变量
Visual Studio 2015 Xamarin.Forms PCL Android debugging - Blank exception, no Callstack, no Locals
我在 Visual Studio 2015 年创建了一个新的空白应用程序(Xamarin.Forms 便携式)项目并修改了 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");
}
当我在 Visual Studio 仿真器中为 Android 调试它时,或者在物理 Android 设备中调试它时,调试器会因异常而停止,但仅此而已。没有可用的异常详细信息,没有调用堆栈,没有本地人,什么都没有:
然而,当我在 Windows Phone 模拟器中调试它时,一切正常:
这是正常行为吗?如何获取异常详细信息、调用堆栈、本地...等?
有什么想法吗?
我正在使用 Visual Studio 2015 RTM,Windows 8.1 Enterprise 64 位。
这对我有用:
调试 -> Windows -> 异常设置
勾选"Common Language Runtime Exceptions."
我在 Visual Studio 2015 年创建了一个新的空白应用程序(Xamarin.Forms 便携式)项目并修改了 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");
}
当我在 Visual Studio 仿真器中为 Android 调试它时,或者在物理 Android 设备中调试它时,调试器会因异常而停止,但仅此而已。没有可用的异常详细信息,没有调用堆栈,没有本地人,什么都没有:
然而,当我在 Windows Phone 模拟器中调试它时,一切正常:
这是正常行为吗?如何获取异常详细信息、调用堆栈、本地...等?
有什么想法吗?
我正在使用 Visual Studio 2015 RTM,Windows 8.1 Enterprise 64 位。
这对我有用:
调试 -> Windows -> 异常设置
勾选"Common Language Runtime Exceptions."