Beispiel #1
0
        /// <summary>
        /// Sets JavaScript breakpoint at a given location.
        /// </summary>
        /// <param name = "location">Location to set breakpoint in.</param>
        /// <param name = "condition">Expression to use as a breakpoint condition. When specified, debugger will only stop on thebreakpoint if this expression evaluates to true.</param>
        /// <returns>returns System.Threading.Tasks.Task&lt;SetBreakpointResponse&gt;</returns>
        public async System.Threading.Tasks.Task <SetBreakpointResponse> SetBreakpointAsync(CefSharp.DevTools.Debugger.Location location, string condition = null)
        {
            ValidateSetBreakpoint(location, condition);
            var dict = new System.Collections.Generic.Dictionary <string, object>();

            dict.Add("location", location.ToDictionary());
            if (!(string.IsNullOrEmpty(condition)))
            {
                dict.Add("condition", condition);
            }

            var methodResult = await _client.ExecuteDevToolsMethodAsync("Debugger.setBreakpoint", dict);

            return(methodResult.DeserializeJson <SetBreakpointResponse>());
        }
Beispiel #2
0
 partial void ValidateSetBreakpoint(CefSharp.DevTools.Debugger.Location location, string condition = null);
Beispiel #3
0
        /// <summary>
        /// Continues execution until specific location is reached.
        /// </summary>
        /// <param name = "location">Location to continue to.</param>
        /// <param name = "targetCallFrames">targetCallFrames</param>
        /// <returns>returns System.Threading.Tasks.Task&lt;DevToolsMethodResponse&gt;</returns>
        public async System.Threading.Tasks.Task <DevToolsMethodResponse> ContinueToLocationAsync(CefSharp.DevTools.Debugger.Location location, string targetCallFrames = null)
        {
            ValidateContinueToLocation(location, targetCallFrames);
            var dict = new System.Collections.Generic.Dictionary <string, object>();

            dict.Add("location", location.ToDictionary());
            if (!(string.IsNullOrEmpty(targetCallFrames)))
            {
                dict.Add("targetCallFrames", targetCallFrames);
            }

            var methodResult = await _client.ExecuteDevToolsMethodAsync("Debugger.continueToLocation", dict);

            return(methodResult);
        }
Beispiel #4
0
 partial void ValidateContinueToLocation(CefSharp.DevTools.Debugger.Location location, string targetCallFrames = null);
Beispiel #5
0
        /// <summary>
        /// Returns possible locations for breakpoint. scriptId in start and end range locations should be
        /// the same.
        /// </summary>
        /// <param name = "start">Start of range to search possible breakpoint locations in.</param>
        /// <param name = "end">End of range to search possible breakpoint locations in (excluding). When not specified, endof scripts is used as end of range.</param>
        /// <param name = "restrictToFunction">Only consider locations which are in the same (non-nested) function as start.</param>
        /// <returns>returns System.Threading.Tasks.Task&lt;GetPossibleBreakpointsResponse&gt;</returns>
        public async System.Threading.Tasks.Task <GetPossibleBreakpointsResponse> GetPossibleBreakpointsAsync(CefSharp.DevTools.Debugger.Location start, CefSharp.DevTools.Debugger.Location end = null, bool?restrictToFunction = null)
        {
            ValidateGetPossibleBreakpoints(start, end, restrictToFunction);
            var dict = new System.Collections.Generic.Dictionary <string, object>();

            dict.Add("start", start.ToDictionary());
            if ((end) != (null))
            {
                dict.Add("end", end.ToDictionary());
            }

            if (restrictToFunction.HasValue)
            {
                dict.Add("restrictToFunction", restrictToFunction.Value);
            }

            var methodResult = await _client.ExecuteDevToolsMethodAsync("Debugger.getPossibleBreakpoints", dict);

            return(methodResult.DeserializeJson <GetPossibleBreakpointsResponse>());
        }
Beispiel #6
0
 partial void ValidateGetPossibleBreakpoints(CefSharp.DevTools.Debugger.Location start, CefSharp.DevTools.Debugger.Location end = null, bool?restrictToFunction = null);