(format?: Dap.StackFrameFormat)
| 264 | } |
| 265 | |
| 266 | async toDap(format?: Dap.StackFrameFormat): Promise<Dap.StackFrame> { |
| 267 | const uiLocation = await this._uiLocation; |
| 268 | const source = uiLocation ? await uiLocation.source.toDap() : undefined; |
| 269 | const isSmartStepped = await shouldSmartStepStackFrame(this); |
| 270 | const presentationHint = this._isAsyncSeparator |
| 271 | ? 'label' |
| 272 | : isSmartStepped |
| 273 | ? 'deemphasize' |
| 274 | : 'normal'; |
| 275 | if (isSmartStepped && source) |
| 276 | source.origin = localize('smartStepSkipLabel', 'Skipped by smartStep'); |
| 277 | |
| 278 | const line = (uiLocation || this._rawLocation).lineNumber; |
| 279 | const column = (uiLocation || this._rawLocation).columnNumber; |
| 280 | |
| 281 | let formattedName = this._name; |
| 282 | |
| 283 | if (source && format) { |
| 284 | if (format.module) { |
| 285 | formattedName += ` [${source.name}]`; |
| 286 | } |
| 287 | |
| 288 | if (format.line) { |
| 289 | formattedName += ` Line ${line}`; |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | return { |
| 294 | id: this._id, |
| 295 | name: formattedName, // TODO: Use params to format the name |
| 296 | line, |
| 297 | column, |
| 298 | source, |
| 299 | presentationHint, |
| 300 | } as Dap.StackFrame; |
| 301 | } |
| 302 | |
| 303 | async format(): Promise<string> { |
| 304 | if (this._isAsyncSeparator) return `◀ ${this._name} ▶`; |
nothing calls this directly
no test coverage detected