gpt4 book ai didi

android - Visual Studio 2015 Xamarin.Forms PCL Android 调试 - 空白异常,无调用堆栈,无本地

转载 作者:行者123 更新时间:2023-11-29 00:08:54 25 4
gpt4 key购买 nike

我在 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");
}

当我在 Visual Studio Emulator for Android 或物理 Android 设备中调试它时,调试器会因异常而停止,仅此而已。没有可用的异常详细信息,没有调用堆栈,没有本地人,什么都没有: enter image description here

但是,当我在 Windows Phone 模拟器中调试它时,一切正常: enter image description here

这是正常行为吗?如何获取异常详细信息、调用堆栈、本地...等?

有什么想法吗?

我使用的是 Visual Studio 2015 RTM,Windows 8.1 Enterprise 64 位。

最佳答案

这对我有用:

调试 -> Windows -> 异常设置

检查“公共(public)语言运行时异常”。

关于android - Visual Studio 2015 Xamarin.Forms PCL Android 调试 - 空白异常,无调用堆栈,无本地,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31700066/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com