Debugger - expand variables with variablesReference
This commit is contained in:
@@ -23,4 +23,5 @@ public class Debugger
|
||||
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);
|
||||
public async Task<List<Variable>> GetVariablesForVariablesReference(int variablesReferenceId) => await _debuggingService.GetVariablesForVariablesReference(variablesReferenceId);
|
||||
}
|
||||
|
||||
@@ -242,6 +242,13 @@ public class DebuggingService
|
||||
return allVariables;
|
||||
}
|
||||
|
||||
public async Task<List<Variable>> GetVariablesForVariablesReference(int variablesReference)
|
||||
{
|
||||
var variablesRequest = new VariablesRequest { VariablesReference = variablesReference };
|
||||
var variablesResponse = _debugProtocolHost.SendRequestSync(variablesRequest);
|
||||
return variablesResponse.Variables;
|
||||
}
|
||||
|
||||
// netcoredbg does not provide the stack frame name in this format, so don't use this if using netcoredbg
|
||||
private static ManagedStackFrameInfo? ParseStackFrameName(string name)
|
||||
{
|
||||
|
||||
@@ -166,6 +166,10 @@ public partial class RunService(ILogger<RunService> logger, RoslynAnalysis rosly
|
||||
{
|
||||
return await _debugger!.GetVariablesForStackFrame(frameId);
|
||||
}
|
||||
public async Task<List<Variable>> GetVariablesForVariablesReference(int variablesReferenceId)
|
||||
{
|
||||
return await _debugger!.GetVariablesForVariablesReference(variablesReferenceId);
|
||||
}
|
||||
|
||||
private async Task<string> GetRunArguments(SharpIdeProjectModel project)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user