public VsCodeStackFrame(VsFormat format, int threadId, int frameIndex, Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Messages.StackFrame frame) : base(0, new SourceLocation(frame.Name, frame.Source?.Path, frame.Line, frame.Column, frame.EndLine ?? -1, frame.EndColumn ?? -1), GetLanguage(frame.Source?.Path)) { this.format = format; this.threadId = threadId; this.frameIndex = frameIndex; this.fullStackframeText = frame.Name; }
public VsCodeStackFrame(VsFormat format, int threadId, int frameIndex, VsStackFrame frame) : base(0, GetSourceLocation(frame), GetLanguage(frame.Source?.Path)) { this.format = format; this.threadId = threadId; this.frameIndex = frameIndex; this.fullStackframeText = frame.Name; this.frameId = frame.Id; }
public VSCodeDebuggerBacktrace(VSCodeDebuggerSession vsCodeDebuggerSession, int threadId) { this.threadId = threadId; this.vsCodeDebuggerSession = vsCodeDebuggerSession; frame0Format = VsCodeStackFrame.GetStackFrameFormat(vsCodeDebuggerSession.EvaluationOptions); var body = vsCodeDebuggerSession.protocolClient.SendRequestSync(new StackTraceRequest(threadId, 0, 1, frame0Format)); totalFramesCount = body.TotalFrames ?? 0; frames = new Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Messages.StackFrame [totalFramesCount]; if (totalFramesCount > 0 && body.StackFrames.Count > 0) { frames [0] = body.StackFrames [0]; } }
public VSCodeDebuggerBacktrace(VSCodeDebuggerSession session, int threadId) { this.session = session; this.threadId = threadId; format = VsCodeStackFrame.GetStackFrameFormat(session.EvaluationOptions); var response = session.protocolClient.SendRequestSync(new StackTraceRequest(threadId) { StartFrame = 0, Levels = 1, Format = format }); FrameCount = response.TotalFrames ?? 0; frames = new VsStackFrame[FrameCount]; scopes = new List <Scope> [FrameCount]; if (FrameCount > 0 && response.StackFrames.Count > 0) { frames[0] = response.StackFrames[0]; } }