MCPcopy
hub / github.com/microsoft/vscode-js-debug / fromDebugger

Method fromDebugger

src/adapter/stackTrace.ts:88–105  ·  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

86 }
87
88 public static fromDebugger(
89 thread: Thread,
90 frames: Cdp.Debugger.CallFrame[],
91 parent?: Cdp.Runtime.StackTrace,
92 parentId?: Cdp.Runtime.StackTraceId,
93 ): StackTrace {
94 const result = new StackTrace(thread);
95 for (const callFrame of frames) {
96 result._appendFrame(StackFrame.fromDebugger(thread, callFrame));
97 }
98 if (parentId) {
99 result._asyncStackTraceId = parentId;
100 console.assert(!parent);
101 } else {
102 result._appendStackTrace(thread, parent);
103 }
104 return result;
105 }
106
107 constructor(private readonly thread: Thread) {
108 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