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

Method fromDebugger

valdi/vscode_debugger/src/adapter/stackTrace.ts:43–58  ·  view source on GitHub ↗
(
    thread: Thread,
    frames: Cdp.Debugger.CallFrame[],
    parent?: Cdp.Runtime.StackTrace,
    parentId?: Cdp.Runtime.StackTraceId,
  )

Source from the content-addressed store, hash-verified

41 }
42
43 public static fromDebugger(
44 thread: Thread,
45 frames: Cdp.Debugger.CallFrame[],
46 parent?: Cdp.Runtime.StackTrace,
47 parentId?: Cdp.Runtime.StackTraceId,
48 ): StackTrace {
49 const result = new StackTrace(thread);
50 for (const callFrame of frames) result._appendFrame(StackFrame.fromDebugger(thread, callFrame));
51 if (parentId) {
52 result._asyncStackTraceId = parentId;
53 console.assert(!parent);
54 } else {
55 result._appendStackTrace(thread, parent);
56 }
57 return result;
58 }
59
60 constructor(thread: Thread) {
61 this._lastFrameThread = thread;

Callers 1

_createPausedDetailsMethod · 0.45

Calls 3

_appendFrameMethod · 0.95
_appendStackTraceMethod · 0.95
assertMethod · 0.65

Tested by

no test coverage detected