/// <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; }
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; } }
/// <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))); }
public static IRunBuilder BreakpointChangedEvent(this IRunBuilder runBuilder, BreakpointReason reason, int line) { return(runBuilder.Event(new BreakpointEvent(reason, line))); }
private static string GetReason(BreakpointReason reason) { Parameter.ThrowIfIsInvalid(reason, BreakpointReason.Unset, nameof(reason)); return(reason.ToString().ToLowerInvariant()); }