(id: string, response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments)
| 2816 | } |
| 2817 | |
| 2818 | private async variableMembersRequest(id: string, response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): Promise<void> { |
| 2819 | // Variable members |
| 2820 | let variable; |
| 2821 | try { |
| 2822 | variable = await this.miDebugger.evalExpression(JSON.stringify(id), -1, -1); |
| 2823 | try { |
| 2824 | let expanded = expandValue(this.createVariable.bind(this), variable.result('value'), id, variable); |
| 2825 | if (!expanded) { |
| 2826 | this.sendErrorResponse(response, 2, 'Could not expand variable'); |
| 2827 | } |
| 2828 | else { |
| 2829 | if (typeof expanded[0] === 'string') { |
| 2830 | expanded = [ |
| 2831 | { |
| 2832 | name: '<value>', |
| 2833 | value: prettyStringArray(expanded), |
| 2834 | variablesReference: 0 |
| 2835 | } |
| 2836 | ]; |
| 2837 | } |
| 2838 | response.body = { |
| 2839 | variables: expanded |
| 2840 | }; |
| 2841 | this.sendResponse(response); |
| 2842 | } |
| 2843 | } |
| 2844 | catch (e) { |
| 2845 | this.sendErrorResponse(response, 2, `Could not expand variable: ${e}`); |
| 2846 | } |
| 2847 | } |
| 2848 | catch (err) { |
| 2849 | this.sendErrorResponse(response, 1, `Could not expand variable: ${err}`); |
| 2850 | } |
| 2851 | } |
| 2852 | |
| 2853 | protected async variablesRequest(response: DebugProtocol.VariablesResponse, args: DebugProtocol.VariablesArguments): Promise<void> { |
| 2854 | response.body = { variables: [] }; |
no test coverage detected