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

Method fromRuntime

src/adapter/stackTrace.ts:70–86  ·  view source on GitHub ↗
(thread: Thread, stack: Cdp.Runtime.StackTrace)

Source from the content-addressed store, hash-verified

68 private _lastFrameThread?: Thread;
69
70 public static fromRuntime(thread: Thread, stack: Cdp.Runtime.StackTrace): StackTrace {
71 const result = new StackTrace(thread);
72 for (const frame of stack.callFrames) {
73 if (!frame.url.endsWith(SourceConstants.InternalExtension)) {
74 result.frames.push(StackFrame.fromRuntime(thread, frame, false));
75 }
76 }
77
78 if (stack.parentId) {
79 result._asyncStackTraceId = stack.parentId;
80 console.assert(!stack.parent);
81 } else {
82 result._appendStackTrace(thread, stack.parent);
83 }
84
85 return result;
86 }
87
88 public static fromDebugger(
89 thread: Thread,

Callers 4

isCrossThreadStepMethod · 0.45
_appendStackTraceMethod · 0.45
textualMessage.tsFile · 0.45
ExceptionMessageClass · 0.45

Calls 3

_appendStackTraceMethod · 0.95
pushMethod · 0.65
assertMethod · 0.65

Tested by

no test coverage detected