public static VariablesResponse GetLocalVariables(Int64 frameId) { int variablesReference = Context.GetVariablesReference(frameId, "Locals"); VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = variablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success); return(JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr)); }
public VariablesResponse GetLocalVariables(string caller_trace, Int64 frameId) { int variablesReference = GetVariablesReference(@"__FILE__:__LINE__" + "\n" + caller_trace, frameId, "Locals"); VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = variablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success, @"__FILE__:__LINE__" + "\n" + caller_trace); return(JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr)); }
public int GetChildVariablesReference(string caller_trace, int VariablesReference, string VariableName) { VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = VariablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success, @"__FILE__:__LINE__" + "\n" + caller_trace); VariablesResponse variablesResponse = JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr); foreach (var Variable in variablesResponse.body.variables) { if (Variable.name == VariableName) { return(Variable.variablesReference); } } throw new ResultNotSuccessException(@"__FILE__:__LINE__" + "\n" + caller_trace); }
public static void EvalVariable(int variablesReference, string Type, string Name, string Value) { VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = variablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success); VariablesResponse variablesResponse = JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr); foreach (var Variable in variablesResponse.body.variables) { if (Variable.name == Name) { Assert.True(Type == Variable.type && Value == Variable.value); return; } } }
public void EvalVariableByIndex(string caller_trace, int variablesReference, string Type, int Index, string Value) { VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = variablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success, @"__FILE__:__LINE__" + "\n" + caller_trace); VariablesResponse variablesResponse = JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr); if (Index < variablesResponse.body.variables.Count) { var Variable = variablesResponse.body.variables[Index]; Assert.Equal(Type, Variable.type, @"__FILE__:__LINE__" + "\n" + caller_trace); Assert.Equal(Value, Variable.value, @"__FILE__:__LINE__" + "\n" + caller_trace); return; } throw new ResultNotSuccessException(@"__FILE__:__LINE__" + "\n" + caller_trace); }
public static void EvalVariableByIndex(int variablesReference, string Type, int Index, string Value) { VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = variablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success); VariablesResponse variablesResponse = JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr); if (Index < variablesResponse.body.variables.Count) { var Variable = variablesResponse.body.variables[Index]; Assert.True(Type == Variable.type && Value == Variable.value); return; } throw new NetcoreDbgTestCore.ResultNotSuccessException(); }
public static int GetChildVariablesReference(int VariablesReference, string VariableName) { VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = VariablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success); VariablesResponse variablesResponse = JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr); foreach (var Variable in variablesResponse.body.variables) { if (Variable.name == VariableName) { return(Variable.variablesReference); } } throw new NetcoreDbgTestCore.ResultNotSuccessException(); }
public bool EvalVariable(string caller_trace, int variablesReference, string ExpectedResult, string ExpectedType, string VariableName) { VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = variablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success, @"__FILE__:__LINE__" + "\n" + caller_trace); VariablesResponse variablesResponse = JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr); foreach (var Variable in variablesResponse.body.variables) { if (Variable.name == VariableName) { Assert.Equal(ExpectedType, Variable.type, @"__FILE__:__LINE__" + "\n" + caller_trace); Assert.Equal(ExpectedResult, Variable.value, @"__FILE__:__LINE__" + "\n" + caller_trace); return(true); } } return(false); }
public void EvalVariable(string caller_trace, int variablesReference, string Type, string Name, string Value) { VariablesRequest variablesRequest = new VariablesRequest(); variablesRequest.arguments.variablesReference = variablesReference; var ret = VSCodeDebugger.Request(variablesRequest); Assert.True(ret.Success, @"__FILE__:__LINE__" + "\n" + caller_trace); VariablesResponse variablesResponse = JsonConvert.DeserializeObject <VariablesResponse>(ret.ResponseStr); foreach (var Variable in variablesResponse.body.variables) { if (Variable.name == Name) { Assert.Equal(Type, Variable.type, @"__FILE__:__LINE__" + "\n" + caller_trace); Assert.Equal(Value, Variable.value, @"__FILE__:__LINE__" + "\n" + caller_trace); return; } } throw new ResultNotSuccessException(@"__FILE__:__LINE__" + "\n" + caller_trace); }