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

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

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

当我在适用于 Android 的 Visual Studio 模拟器或物理 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/

相关文章:

Xamarin 安卓播放器

c# - System.ObjectModel 警告 Xamarin 无法在 Android 上运行

java - 上下移动圆形 float 操作按钮以避免被 snackbar 阻挡

Android 应用程序无法正确卸载

android - 如何在 Android 上呈现一个漂亮的对话 UI?

javascript 调试 - 有没有办法告诉正在执行的功能?

c++ - 在 Eclipse 中使用 GDB 时出错 : "Command ' -list-features' is timed out"

ios - 如何在 Xcode 中调试插件源代码?

c# - Visual Studio 2017 Xamarin Android 编译警告 "fakeLogOpen(/dev/log_security) failed"中断构建

android - 使用 WindowManager.updateViewLayout() 获取 View 以动画化到其新位置