Russell Corbin
Russell Corbin

Reputation: 135

Debugging Xamarin.Forms iOS apps on Visual Studio using a Mac Agent

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.

ie. on Main.cs This line:

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

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?

Thanks in advance

Upvotes: 1

Views: 477

Answers (1)

Uros
Uros

Reputation: 2150

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.

Upvotes: 1

Related Questions