void IPlatformAppLauncher.SetupForDebugging(out LaunchOptions debuggerLaunchOptions) { if (_launchOptions == null) { Debug.Fail("Why is SetupForDebugging being called before ParseLaunchOptions?"); throw new InvalidOperationException(); } _client = VcRemoteClient.GetInstance(_launchOptions); _remotePorts = _client.StartDebugListener(); if (_launchOptions.IOSDebugTarget == IOSDebugTarget.Device) { _appRemotePath = _client.GetRemoteAppPath(); } debuggerLaunchOptions = new TcpLaunchOptions(_launchOptions.RemoteMachineName, _remotePorts.DebugListenerPort, _launchOptions.Secure); (debuggerLaunchOptions as TcpLaunchOptions).ServerCertificateValidationCallback = _client.ServerCertificateValidationCallback; debuggerLaunchOptions.TargetArchitecture = _launchOptions.TargetArchitecture; debuggerLaunchOptions.AdditionalSOLibSearchPath = _launchOptions.AdditionalSOLibSearchPath; debuggerLaunchOptions.DebuggerMIMode = MIMode.Lldb; debuggerLaunchOptions.CustomLaunchSetupCommands = GetCustomLaunchSetupCommands(); debuggerLaunchOptions.LaunchCompleteCommand = GetLaunchCompleteCommand(); }
void IPlatformAppLauncher.SetupForDebugging(out LaunchOptions debuggerLaunchOptions) { if (_launchOptions == null) { Debug.Fail("Why is SetupForDebugging being called before ParseLaunchOptions?"); throw new InvalidOperationException(); } _client = VcRemoteClient.GetInstance(_launchOptions); _remotePorts = _client.StartDebugListener(); if (_launchOptions.IOSDebugTarget == IOSDebugTarget.Device) { _appRemotePath = _client.GetRemoteAppPath(); } debuggerLaunchOptions = new TcpLaunchOptions(_launchOptions.RemoteMachineName, _remotePorts.DebugListenerPort, _launchOptions.Secure); if (_client.ServerCertificateValidationCallback != null) { (debuggerLaunchOptions as TcpLaunchOptions).ServerCertificateValidationCallback = (object sender, object /*X509Certificate*/ certificate, object /*X509Chain*/ chain, SslPolicyErrors sslPolicyErrors) => { return(_client.ServerCertificateValidationCallback(sender, (X509Certificate)certificate, (X509Chain)chain, sslPolicyErrors)); }; } debuggerLaunchOptions.TargetArchitecture = _launchOptions.TargetArchitecture; debuggerLaunchOptions.AdditionalSOLibSearchPath = _launchOptions.AdditionalSOLibSearchPath; debuggerLaunchOptions.DebuggerMIMode = MIMode.Lldb; debuggerLaunchOptions.CustomLaunchSetupCommands = GetCustomLaunchSetupCommands(); debuggerLaunchOptions.LaunchCompleteCommand = GetLaunchCompleteCommand(); }
public static VcRemoteClient GetInstance(IOSLaunchOptions options) { VcRemoteClient client = null; string baseAddressFormat = string.Empty; if (options.Secure) { var handler = new RequestAuthHandler(); client = new VcRemoteClient(handler); client.ServerCertificateValidationCallback = handler.ServerCertificateValidationCallback; baseAddressFormat = @"https://{0}:{1}/"; } else { client = new VcRemoteClient(); baseAddressFormat = @"http://{0}:{1}/"; } client.BaseAddress = new Uri(string.Format(CultureInfo.InvariantCulture, baseAddressFormat, options.RemoteMachineName, options.VcRemotePort)); client.Timeout = new TimeSpan(0, 0, 10); //10 second timeout client.Secure = options.Secure; client._launchOptions = options; return client; }
public static VcRemoteClient GetInstance(IOSLaunchOptions options) { VcRemoteClient client = null; string baseAddressFormat = string.Empty; if (options.Secure) { var handler = new RequestAuthHandler(); client = new VcRemoteClient(handler); client.ServerCertificateValidationCallback = handler.ServerCertificateValidationCallback; baseAddressFormat = @"https://{0}:{1}/"; } else { client = new VcRemoteClient(); baseAddressFormat = @"http://{0}:{1}/"; } client.BaseAddress = new Uri(string.Format(CultureInfo.InvariantCulture, baseAddressFormat, options.RemoteMachineName, options.VcRemotePort)); client.Timeout = new TimeSpan(0, 0, 10); //10 second timeout client.Secure = options.Secure; client._launchOptions = options; return(client); }