简体   繁体   English

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

[英]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.

相关问题 Xamarin.Forms空白应用程序(PCL)在Android上编译错误 - Xamarin.Forms blank App (PCL) compile errors on Android iOS,Android,Windows 10移动模拟器可用于使用Visual Studio 2015开发Xamarin.Forms吗? - Are iOS, Android, Windows 10 mobile emulators available for developing Xamarin.Forms with Visual Studio 2015? SQLite Xamarin.Forms PCL错误在Android上 - SQLite Xamarin.Forms PCL errors on Android 使用Xamarin.Forms时,Xamarin.Droid在Visual Studio 2015中导致生成错误 - Xamarin.Droid causing build errors in Visual Studio 2015 when using Xamarin.Forms 如何使用Visual Studio 2015对Xamarin.Forms应用程序进行签名和打包? - How can I sign and package Xamarin.Forms application using Visual Studio 2015? Visual Studio 编译错误,Xamarin.forms - Visual studio compilation error, Xamarin.forms Visual Studio 2015中的Xamarin本机PCL-新应用错误 - Xamarin Native PCL in Visual Studio 2015 - New App errors Android上的Xamarin.Forms ListView OutOfMemoryError异常 - Xamarin.Forms ListView OutOfMemoryError exception on Android 在后台Xamarin.Forms中调用PCL方法 - Call PCL method in background Xamarin.Forms Xamarin.Forms PCL和ServiceStack 4.5 - Xamarin.Forms PCL & ServiceStack 4.5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM