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

Method getVariableNames

src/adapter/variableStore.ts:1701–1711  ·  view source on GitHub ↗

* Gets variable names from a known IVariableContainer. An optimized * version of `getVariables` that saves work generating previews.

(
    params: Dap.VariablesParams,
  )

Source from the content-addressed store, hash-verified

1699 * version of `getVariables` that saves work generating previews.
1700 */
1701 public async getVariableNames(
1702 params: Dap.VariablesParams,
1703 ): Promise<{ name: string; remoteObject: Cdp.Runtime.RemoteObject }[]> {
1704 const container = this.vars.get(params.variablesReference);
1705 if (!container) {
1706 return [];
1707 }
1708
1709 const children = await container.getChildren(params);
1710 return children.filter(isInstanceOf(Variable));
1711 }
1712
1713 /** Gets variables from a known {@link IVariableContainer} */
1714 public async getVariables(params: Dap.VariablesParams): Promise<Dap.Variable[]> {

Callers 3

StackFrameClass · 0.80
doHoistMethod · 0.80

Calls 4

isInstanceOfFunction · 0.90
getMethod · 0.65
getChildrenMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected