()
| 340 | } |
| 341 | |
| 342 | async completions(): Promise<Dap.CompletionItem[]> { |
| 343 | if (!this._scope) return []; |
| 344 | const variableStore = this._thread.pausedVariables(); |
| 345 | if (!variableStore) { |
| 346 | return []; |
| 347 | } |
| 348 | |
| 349 | const promises: Promise<Dap.CompletionItem[]>[] = []; |
| 350 | for (let scopeNumber = 0; scopeNumber < this._scope.chain.length; scopeNumber++) { |
| 351 | promises.push( |
| 352 | this._scopeVariable(scopeNumber, this._scope).then(async scopeVariable => { |
| 353 | if (!scopeVariable.variablesReference) return []; |
| 354 | const variables = await variableStore.getVariables({ |
| 355 | variablesReference: scopeVariable.variablesReference, |
| 356 | }); |
| 357 | return variables.map(variable => ({ label: variable.name, type: 'property' })); |
| 358 | }), |
| 359 | ); |
| 360 | } |
| 361 | const completions = await Promise.all(promises); |
| 362 | return ([] as Dap.CompletionItem[]).concat(...completions); |
| 363 | } |
| 364 | } |
nothing calls this directly
no test coverage detected