(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments)
| 2676 | } |
| 2677 | |
| 2678 | private async globalVariablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): Promise<void> { |
| 2679 | const symbolInfo: SymbolInformation[] = this.symbolTable.getGlobalVariables(); |
| 2680 | const globals: DebugProtocol.Variable[] = []; |
| 2681 | try { |
| 2682 | for (const symbol of symbolInfo) { |
| 2683 | const varObjName = `global_var_${symbol.name}`; |
| 2684 | const tmp = await this.updateOrCreateVariable(symbol.name, symbol.name, varObjName, args.variablesReference, -1, -1, true); |
| 2685 | globals.push(tmp); |
| 2686 | } |
| 2687 | |
| 2688 | response.body = { variables: globals }; |
| 2689 | this.sendResponse(response); |
| 2690 | } |
| 2691 | catch (err) { |
| 2692 | this.sendErrorResponse(response, 1, `Could not get global variable information: ${err}`); |
| 2693 | } |
| 2694 | } |
| 2695 | |
| 2696 | private createStaticVarName(fHash: string, name: string): string { |
| 2697 | const varObjName = `static_var_${name}_${fHash}`; |
no test coverage detected