public ObjectValue [] GetChildren(ObjectPath path, int index, int count, EvaluationOptions options) { if (objValChildren == null) { var children = vsCodeDebuggerSession.protocolClient.SendRequestSync(new VariablesRequest( variablesReference )).Variables; objValChildren = children.Select(c => VSCodeDebuggerBacktrace.VsCodeVariableToObjectValue(vsCodeDebuggerSession, c.Name, c.EvaluateName, c.Type, c.Value, c.VariablesReference, variablesReference, frameId)).ToArray(); } return(objValChildren); }
public ObjectValue[] GetChildren(ObjectPath path, int index, int count, EvaluationOptions options) { if (objValChildren == null) { if (variablesReference <= 0) { objValChildren = new ObjectValue[0]; } else { using (var timer = vsCodeDebuggerSession.EvaluationStats.StartTimer()) { var children = vsCodeDebuggerSession.protocolClient.SendRequestSync(new VariablesRequest( variablesReference )).Variables; objValChildren = children.Select(c => VSCodeDebuggerBacktrace.VsCodeVariableToObjectValue(vsCodeDebuggerSession, c.Name, c.EvaluateName, c.Type, c.Value, c.VariablesReference, variablesReference, frameId)).ToArray(); timer.Success = true; } } } return(objValChildren); }