Add Start method to debugger server and client

This commit is contained in:
Yoshi Askharoun
2025-10-03 21:21:35 -05:00
parent ae9b24dc34
commit 0f95c084e8
4 changed files with 12 additions and 2 deletions
@@ -5,6 +5,8 @@ namespace Microsoft.Iris.Debug;
public interface IDebuggerState public interface IDebuggerState
{ {
void Start();
InterpreterCommand DebuggerCommand { get; set; } InterpreterCommand DebuggerCommand { get; set; }
} }
@@ -14,6 +14,8 @@ public class InProcDebugger : IDebuggerClient, IDebuggerServer
public event EventHandler<InterpreterEntry> InterpreterExecute; public event EventHandler<InterpreterEntry> InterpreterExecute;
public event Action<string> DispatcherStep; public event Action<string> DispatcherStep;
public void Start() { }
public void RequestLineNumberTable(string uri, Action<MarkupLineNumberEntry[]> callback) public void RequestLineNumberTable(string uri, Action<MarkupLineNumberEntry[]> callback)
{ {
var lineNumberTable = ((IDebuggerServer)this).OnLineNumberTableRequested(uri); var lineNumberTable = ((IDebuggerServer)this).OnLineNumberTableRequested(uri);
@@ -44,7 +44,10 @@ public class NetDebuggerClient : IDebuggerClient, IRemoteDebuggerState, IDisposa
ConnectionUri = connectionUri ?? DebugRemoting.DEFAULT_TCP_URI; ConnectionUri = connectionUri ?? DebugRemoting.DEFAULT_TCP_URI;
_socket = new(SocketType.Stream, ProtocolType.Tcp); _socket = new(SocketType.Stream, ProtocolType.Tcp);
_formatter = DebugRemoting.CreateBsonFormatter(); _formatter = DebugRemoting.CreateBsonFormatter();
}
public void Start()
{
System.Threading.Thread connectThread = new(ConnectLoop) { IsBackground = true }; System.Threading.Thread connectThread = new(ConnectLoop) { IsBackground = true };
connectThread.Start(); connectThread.Start();
} }
@@ -45,10 +45,13 @@ public class NetDebuggerServer : IDebuggerServer, IRemoteDebuggerState, IDisposa
_formatter = DebugRemoting.CreateBsonFormatter(); _formatter = DebugRemoting.CreateBsonFormatter();
Current = this;
}
public void Start()
{
System.Threading.Thread connectThread = new(ConnectLoop) { IsBackground = true }; System.Threading.Thread connectThread = new(ConnectLoop) { IsBackground = true };
connectThread.Start(); connectThread.Start();
Current = this;
} }
public MarkupLineNumberEntry[] OnLineNumberTableRequested(string uri) public MarkupLineNumberEntry[] OnLineNumberTableRequested(string uri)