Anyone getting this error: iOS, Xamarin Forms. Sometimes it just freezes in debug mode. If you wait about 5 minutes you'll get this error below.
Error 3 There was an unhandled exception trying to deploy and run your application.
System.AggregateException: One or more errors occurred. ---> System.ArgumentException: Debug port cannot be zero when connecting
Parameter name: debugPort
at Mono.Debugging.Soft.SoftDebuggerConnectArgs..ctor(String appName, IPAddress address, Int32 debugPort, Int32 outputPort)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.CreateDebuggerStartInfo(VSBuildServerClient server, MonoTouchDevice device, MonoTouchFlavoredProject project, IVsDebugger2 debugger, Int32 debugPort, Int32 consolePort)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.GetDebugSession(VSBuildServerClient server, MonoTouchFlavoredProject project, MonoTouchDevice device, String outputDirectory, IVsDebugger2 debugger, IVsOutputWindowPane output, Int32& appConsolePort)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.DebugApplication(VSBuildServerClient server, MonoTouchDevice device, IVsOutputWindowPane output, MonoTouchProgressNotifier notifier, LogReader consoleLogReader)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.<>c__DisplayClassa.<DebugLaunchHack>b__6(VSBuildServerClient server)
at Xamarin.VisualStudio.IOS.Utilities.BuildServer.<>c__DisplayClass88`1.<RunOnlyIfConnected>b__86()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.DebugLaunchHack(__VSDBGLAUNCHFLAGS grfLaunch)
---> (Inner Exception #0) System.ArgumentException: Debug port cannot be zero when connecting
Parameter name: debugPort
at Mono.Debugging.Soft.SoftDebuggerConnectArgs..ctor(String appName, IPAddress address, Int32 debugPort, Int32 outputPort)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.CreateDebuggerStartInfo(VSBuildServerClient server, MonoTouchDevice device, MonoTouchFlavoredProject project, IVsDebugger2 debugger, Int32 debugPort, Int32 consolePort)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.GetDebugSession(VSBuildServerClient server, MonoTouchFlavoredProject project, MonoTouchDevice device, String outputDirectory, IVsDebugger2 debugger, IVsOutputWindowPane output, Int32& appConsolePort)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.DebugApplication(VSBuildServerClient server, MonoTouchDevice device, IVsOutputWindowPane output, MonoTouchProgressNotifier notifier, LogReader consoleLogReader)
at Xamarin.VisualStudio.IOS.MonoTouchFlavoredProject.<>c__DisplayClassa.<DebugLaunchHack>b__6(VSBuildServerClient server)
at Xamarin.VisualStudio.IOS.Utilities.BuildServer.<>c__DisplayClass88`1.<RunOnlyIfConnected>b__86()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()<---
0 0