void IDebuggeeListener.X_DebuggeeArrived(IDebuggeeSender toDebuggee) { lock (this) { if (fakeBreakpointMode != null) { return; } this.toDebuggee = toDebuggee; Program.WaitingUI.BeginInvoke(new Action(() => { Program.WaitingUI.Hide(); })); var welcome = new { command = "welcome", sourceBasePath = sourceBasePath, directorySeperator = Path.DirectorySeparatorChar, }; toDebuggee.Send(JsonConvert.SerializeObject(welcome)); SendResponse(startCommand, startSeq, null); toVSCode.SendMessage(new InitializedEvent()); } }
void IDebuggeeListener.X_DebuggeeHasGone() { System.Threading.Thread.Sleep(500); lock (this) { if (fakeBreakpointMode != null) { return; } // attach 일 경우 Terminate하지 않고 재시작 if (startCommand == "attach") { toDebuggee = null; Program.WaitingUI.BeginInvoke(new Action(() => { Program.WaitingUI.Show(); })); listener.Start(); Program.WaitingUI.SetLabelText( "Waiting for debugee at TCP " + listener.LocalEndpoint.ToString() + "..."); var ncom = new DebuggeeProtocol( this, listener, encoding); ncom.StartThread(); } else { toVSCode.SendMessage(new TerminatedEvent()); } } }
void IDebuggeeListener.X_DebuggeeArrived(IDebuggeeSender toDebuggee) { lock (this) { if (fakeBreakpointMode != null) { return; } this.toDebuggee = toDebuggee; Program.WaitingUI.Hide(); var welcome = new { command = "welcome", sourceBasePath = sourceBasePath }; toDebuggee.Send(JsonConvert.SerializeObject(welcome)); SendResponse(startCommand, startSeq, null); toVSCode.SendMessage(new InitializedEvent()); startCommand = null; } }