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(); }
static internal TcpLaunchOptions CreateFromXml(Xml.LaunchOptions.TcpLaunchOptions source) { var options = new TcpLaunchOptions(RequireAttribute(source.Hostname, "Hostname"), LaunchOptions.RequirePortAttribute(source.Port, "Port"), source.Secure); options.InitializeCommonOptions(source); return options; }