MCPcopy Create free account
hub / github.com/Snapchat/Valdi / toDap

Method toDap

valdi/vscode_debugger/src/adapter/stackTrace.ts:118–130  ·  view source on GitHub ↗
(params: Dap.StackTraceParams)

Source from the content-addressed store, hash-verified

116 }
117
118 async toDap(params: Dap.StackTraceParams): Promise<Dap.StackTraceResult> {
119 const from = params.startFrame || 0;
120 let to = (params.levels || 50) + from;
121 const frames = await this.loadFrames(to);
122 to = Math.min(frames.length, params.levels ? to : frames.length);
123 const result: Dap.StackFrame[] = [];
124 for (let index = from; index < to; index++)
125 result.push(await frames[index].toDap(params.format));
126 return {
127 stackFrames: result,
128 totalFrames: !!this._asyncStackTraceId ? 1000000 : frames.length,
129 };
130 }
131}
132
133interface IScope {

Callers 2

scopesMethod · 0.45
toDapMethod · 0.45

Calls 2

loadFramesMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected