debugger step in, step out, continue
This commit is contained in:
@@ -16,6 +16,9 @@ public class Debugger
|
||||
}
|
||||
|
||||
public async Task StepOver(int threadId, CancellationToken cancellationToken = default) => await _debuggingService.StepOver(threadId, cancellationToken);
|
||||
public async Task StepInto(int threadId, CancellationToken cancellationToken = default) => await _debuggingService.StepInto(threadId, cancellationToken);
|
||||
public async Task StepOut(int threadId, CancellationToken cancellationToken = default) => await _debuggingService.StepOut(threadId, cancellationToken);
|
||||
public async Task Continue(int threadId, CancellationToken cancellationToken = default) => await _debuggingService.Continue(threadId, cancellationToken);
|
||||
public async Task<List<ThreadModel>> GetThreadsAtStopPoint() => await _debuggingService.GetThreadsAtStopPoint();
|
||||
public async Task<List<StackFrameModel>> GetStackFramesForThread(int threadId) => await _debuggingService.GetStackFramesForThread(threadId);
|
||||
public async Task<List<Variable>> GetVariablesForStackFrame(int frameId) => await _debuggingService.GetVariablesForStackFrame(frameId);
|
||||
|
||||
@@ -162,6 +162,24 @@ public class DebuggingService
|
||||
var nextRequest = new NextRequest(threadId);
|
||||
_debugProtocolHost.SendRequestSync(nextRequest);
|
||||
}
|
||||
public async Task StepInto(int threadId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
|
||||
var stepInRequest = new StepInRequest(threadId);
|
||||
_debugProtocolHost.SendRequestSync(stepInRequest);
|
||||
}
|
||||
public async Task StepOut(int threadId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
|
||||
var stepOutRequest = new StepOutRequest(threadId);
|
||||
_debugProtocolHost.SendRequestSync(stepOutRequest);
|
||||
}
|
||||
public async Task Continue(int threadId, CancellationToken cancellationToken)
|
||||
{
|
||||
await Task.CompletedTask.ConfigureAwait(ConfigureAwaitOptions.ForceYielding);
|
||||
var continueRequest = new ContinueRequest(threadId);
|
||||
_debugProtocolHost.SendRequestSync(continueRequest);
|
||||
}
|
||||
|
||||
public async Task<List<ThreadModel>> GetThreadsAtStopPoint()
|
||||
{
|
||||
|
||||
@@ -150,10 +150,10 @@ public class RunService(ILogger<RunService> logger, RoslynAnalysis roslynAnalysi
|
||||
await project.RunningCancellationTokenSource.CancelAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task SendDebuggerStepOver(int threadId)
|
||||
{
|
||||
await _debugger!.StepOver(threadId);
|
||||
}
|
||||
public async Task SendDebuggerStepOver(int threadId) => await _debugger!.StepOver(threadId);
|
||||
public async Task SendDebuggerStepInto(int threadId) => await _debugger!.StepInto(threadId);
|
||||
public async Task SendDebuggerStepOut(int threadId) => await _debugger!.StepOut(threadId);
|
||||
public async Task SendDebuggerContinue(int threadId) => await _debugger!.Continue(threadId);
|
||||
|
||||
public async Task<List<ThreadModel>> GetThreadsAtStopPoint()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user