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

Method expandAsyncStack

src/adapter/stackTrace.ts:117–142  ·  view source on GitHub ↗
(limit: number, noFuncEval?: boolean)

Source from the content-addressed store, hash-verified

115 }
116
117 private async expandAsyncStack(limit: number, noFuncEval?: boolean) {
118 while (this.frames.length < limit && this._asyncStackTraceId) {
119 if (this._asyncStackTraceId.debuggerId) {
120 this._lastFrameThread = Thread.threadForDebuggerId(this._asyncStackTraceId.debuggerId);
121 }
122
123 if (!this._lastFrameThread) {
124 this._asyncStackTraceId = undefined;
125 break;
126 }
127
128 if (noFuncEval) {
129 this._lastFrameThread
130 .cdp()
131 .DotnetDebugger.setEvaluationOptions({ options: { noFuncEval }, type: 'stackFrame' });
132 }
133
134 const response = await this._lastFrameThread
135 .cdp()
136 .Debugger.getStackTrace({ stackTraceId: this._asyncStackTraceId });
137 this._asyncStackTraceId = undefined;
138 if (response) {
139 this._appendStackTrace(this._lastFrameThread, response.stackTrace);
140 }
141 }
142 }
143
144 private expandWasmFrames() {
145 return (this._lastInlineWasmExpanded = this._lastInlineWasmExpanded.then(async last => {

Callers 1

loadFramesMethod · 0.95

Calls 5

_appendStackTraceMethod · 0.95
threadForDebuggerIdMethod · 0.80
setEvaluationOptionsMethod · 0.80
getStackTraceMethod · 0.80
cdpMethod · 0.45

Tested by

no test coverage detected