in src/mockDebug.ts [453:471]
protected setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): void {
const container = this._variableHandles.get(args.variablesReference);
const rv = container === 'locals'
? this._runtime.getLocalVariable(args.name)
: container instanceof RuntimeVariable && container.value instanceof Array
? container.value.find(v => v.name === args.name)
: undefined;
if (rv) {
rv.value = this.convertToRuntime(args.value);
response.body = this.convertFromRuntime(rv);
if (rv.memory && rv.reference) {
this.sendEvent(new MemoryEvent(String(rv.reference), 0, rv.memory.length));
}
}
this.sendResponse(response);
}