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

Method findVariableStore

src/adapter/debugAdapter.ts:436–451  ·  view source on GitHub ↗
(fn: (store: VariableStore) => boolean)

Source from the content-addressed store, hash-verified

434 }
435
436 private findVariableStore(fn: (store: VariableStore) => boolean) {
437 if (!this._thread) {
438 return undefined;
439 }
440
441 const pausedVariables = this._thread.pausedVariables();
442 if (pausedVariables && fn(pausedVariables)) {
443 return pausedVariables;
444 }
445
446 if (fn(this._thread.replVariables)) {
447 return this._thread.replVariables;
448 }
449
450 return undefined;
451 }
452
453 async _onLocations(params: Dap.LocationsParams): Promise<Dap.LocationsResult> {
454 const variableStore = this.findVariableStore(v => v.hasVariable(params.locationReference));

Callers 5

_onLocationsMethod · 0.95
_onVariablesMethod · 0.95
_onReadMemoryMethod · 0.95
_onWriteMemoryMethod · 0.95
_onSetVariableMethod · 0.95

Calls 1

pausedVariablesMethod · 0.80

Tested by

no test coverage detected