示例#1
0
        /// <summary>
        /// Create an expected breakpoint event that works over a range of lines
        /// </summary>
        public BreakpointEvent(BreakpointReason reason, int startLine, int endLine)
            : this(reason, line : null)
        {
            Parameter.ThrowIfNegativeOrZero(startLine, nameof(startLine));
            Parameter.ThrowIfNegativeOrZero(startLine, nameof(endLine));

            this.startLine       = startLine;
            this.endLine         = endLine;
            this.verifyLineRange = true;
        }
示例#2
0
        public BreakpointEvent(BreakpointReason reason, int?line)
            : base("breakpoint")
        {
            this.ExpectedResponse.body.reason = GetReason(reason);

            if (line != null)
            {
                this.ExpectedResponse.body.breakpoint      = new BreakpointEventValue.Body.Breakpoint();
                this.ExpectedResponse.body.breakpoint.line = line;
            }
        }
示例#3
0
 /// <summary>
 /// Function breakpoints may resolve to different lines depending on the compiler/debugger combination.
 /// Sometimes they resolve to the curly brace line. Other times on the first line of code.
 /// </summary>
 public static IRunBuilder FunctionBreakpointChangedEvent(this IRunBuilder runBuilder, BreakpointReason reason, int startLine, int endLine)
 {
     return(runBuilder.Event(new BreakpointEvent(reason, startLine, endLine)));
 }
示例#4
0
 public static IRunBuilder BreakpointChangedEvent(this IRunBuilder runBuilder, BreakpointReason reason, int line)
 {
     return(runBuilder.Event(new BreakpointEvent(reason, line)));
 }
示例#5
0
 private static string GetReason(BreakpointReason reason)
 {
     Parameter.ThrowIfIsInvalid(reason, BreakpointReason.Unset, nameof(reason));
     return(reason.ToString().ToLowerInvariant());
 }