private static DebugAttachInfo GetTcpAttachDebugInfo(IAdapterLaunchInfo adapterLaunchInfo) { var debugAttachInfo = new DebugAttachInfo(); adapterLaunchInfo.DebugPort.GetPortName(out var adapterHostPortInfo); debugAttachInfo.RemoteUri = new Uri(adapterHostPortInfo); var uriInfo = new Uri(adapterHostPortInfo); debugAttachInfo.Host = uriInfo.Host; debugAttachInfo.Port = uriInfo.Port; return(debugAttachInfo); }
public static ITargetHostProcess Attach(DebugAttachInfo debugAttachInfo) { var attachedProcess = new DebugAdapterRemoteProcess(); return(attachedProcess.ConnectSocket(debugAttachInfo.RemoteUri) ? attachedProcess : null); }