【问题标题】:Visual Studio 2015 Xamarin.Forms PCL Android debugging - Blank exception, no Callstack, no LocalsVisual Studio 2015 Xamarin.Forms PCL Android 调试 - 空白异常,没有 Callstack,没有 Locals
【发布时间】:2015-07-29 12:11:54
【问题描述】:

我在 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 设备中调试它时,调试器会在出现异常时停止,但仅此而已。没有可用的异常详细信息,没有调用堆栈,没有本地变量,什么都没有:

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

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

有什么想法吗?

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

【问题讨论】:

    标签: android debugging xamarin visual-studio-2015 xamarin.forms


    【解决方案1】:

    这对我有用:

    调试 -> Windows -> 异常设置

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-04
      • 1970-01-01
      • 2019-03-28
      • 2013-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-22
      相关资源
      最近更新 更多