public async setValue()

in src/legacyEdge/edgeVariablesContainer.ts [44:66]


    public async setValue(adapter: EdgeDebugAdapter, name: string, value: string): Promise<string> {
        const msDebuggerPropertyId = this._childPropertiesMapping.get(name);

        if (this._useRuntimeCallFunctionOnForAllVariables || !msDebuggerPropertyId) {
            // If msDebuggerPropertyId is not present, default to super setValue for this variable.
            await super.setValue(adapter, name, value)
                .catch(() => {
                    throw coreUtils.errP(localize('edge.debug.error.msSetDebuggerPropertyValue', 'Unable to update the value for this property.'));
                });
            return value;
        }

        const edgeDebugClient: EdgeDebugClient = adapter.chrome.Debugger as EdgeDebugClient;

        await edgeDebugClient.msSetDebuggerPropertyValue({
            'debuggerPropertyId': msDebuggerPropertyId,
            'newValue': value
        }).catch(() => {
            throw coreUtils.errP(localize('edge.debug.error.msSetDebuggerPropertyValue', 'Unable to update the value for this property.'));
        });

        return value;
    }