使用 Mac 代理在 Visual Studio 上调试 Xamarin.Forms iOS 应用程序 [英] Debugging Xamarin.Forms iOS apps on Visual Studio using a Mac Agent

查看:36
本文介绍了使用 Mac 代理在 Visual Studio 上调试 Xamarin.Forms iOS 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 Visual Studio 2015 上的 Mac 代理调试我的 Xamarin.Forms 应用程序.iPhone 模拟器运行良好,但每当遇到错误时,VS(在 Windows 上)总是在同一行中断,无论在哪里错误在代码中.

I am attempting to debug my Xamarin.Forms app through a Mac Agent on Visual Studio 2015. The iPhone Simulator works well but whenever it comes across an error VS (On Windows) always breaks at the same line, no matter where the error is in the code.

即.在 Main.cs 这一行:

ie. on Main.cs This line:

    UIApplication.Main(args,null,"AppDelegate");

堆栈信息也没有用.找到实际错误行的唯一方法是设置一个断点并逐步执行直到它崩溃.这是非常缓慢和烦人的.有谁知道使用 Mac 代理在 VS 上进行调试的更好方法吗?

The stack info is of no use either. The only way to find the actual error line is to put a break point and step through until it crashes. This is very slow and annoying. Does anyone know a better way to debug on VS using a Mac Agent?

提前致谢

推荐答案

您可以在 Debug->Windows->Exception settings 中设置 Common Language Runtime Exceptions 进行设置.有了这个,您的代码将在每个异常时中断.不幸的是,这也会打破库中的异常,因此会给您一些提示,但这种方式帮助我找到了一些异常原因.

You can go to Debug->Windows->Exception settings and set Common Language Runtime Exceptions to be set. With that your code will break on every exception. Unfortunately, this will also break on exceptions in libraries so that will give you some noice, but this way helped me find some exception causes.

这篇关于使用 Mac 代理在 Visual Studio 上调试 Xamarin.Forms iOS 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆