Exemple #1
0
        /// <summary>
        /// Changes return value in top frame. Available only at return break position.
        /// </summary>
        /// <param name = "newValue">New return value.</param>
        /// <returns>returns System.Threading.Tasks.Task&lt;DevToolsMethodResponse&gt;</returns>
        public async System.Threading.Tasks.Task <DevToolsMethodResponse> SetReturnValueAsync(CefSharp.DevTools.Runtime.CallArgument newValue)
        {
            ValidateSetReturnValue(newValue);
            var dict = new System.Collections.Generic.Dictionary <string, object>();

            dict.Add("newValue", newValue.ToDictionary());
            var methodResult = await _client.ExecuteDevToolsMethodAsync("Debugger.setReturnValue", dict);

            return(methodResult);
        }
Exemple #2
0
        /// <summary>
        /// Changes value of variable in a callframe. Object-based scopes are not supported and must be
        /// mutated manually.
        /// </summary>
        /// <param name = "scopeNumber">0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'scope types are allowed. Other scopes could be manipulated manually.</param>
        /// <param name = "variableName">Variable name.</param>
        /// <param name = "newValue">New variable value.</param>
        /// <param name = "callFrameId">Id of callframe that holds variable.</param>
        /// <returns>returns System.Threading.Tasks.Task&lt;DevToolsMethodResponse&gt;</returns>
        public async System.Threading.Tasks.Task <DevToolsMethodResponse> SetVariableValueAsync(int scopeNumber, string variableName, CefSharp.DevTools.Runtime.CallArgument newValue, string callFrameId)
        {
            ValidateSetVariableValue(scopeNumber, variableName, newValue, callFrameId);
            var dict = new System.Collections.Generic.Dictionary <string, object>();

            dict.Add("scopeNumber", scopeNumber);
            dict.Add("variableName", variableName);
            dict.Add("newValue", newValue.ToDictionary());
            dict.Add("callFrameId", callFrameId);
            var methodResult = await _client.ExecuteDevToolsMethodAsync("Debugger.setVariableValue", dict);

            return(methodResult);
        }