(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments)
| 181 | } |
| 182 | |
| 183 | protected async setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): Promise<void> { |
| 184 | try { |
| 185 | if (this.useVarObjects) { |
| 186 | let name = args.name; |
| 187 | const parent = this.variableHandles.get(args.variablesReference); |
| 188 | if (parent instanceof VariableScope) { |
| 189 | name = VariableScope.variableName(args.variablesReference, name); |
| 190 | } else if (parent instanceof VariableObject) { |
| 191 | name = `${parent.name}.${name}`; |
| 192 | } |
| 193 | |
| 194 | const res = await this.miDebugger.varAssign(name, args.value); |
| 195 | response.body = { |
| 196 | value: res.result("value") |
| 197 | }; |
| 198 | } else { |
| 199 | await this.miDebugger.changeVariable(args.name, args.value); |
| 200 | response.body = { |
| 201 | value: args.value |
| 202 | }; |
| 203 | } |
| 204 | this.sendResponse(response); |
| 205 | } catch (err) { |
| 206 | this.sendErrorResponse(response, 11, `Could not continue: ${err}`); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | protected setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void { |
| 211 | const all = []; |
nothing calls this directly
no test coverage detected