public void AddPauseState(DebuggerPauseState state) { if (state == null) { throw new ArgumentNullException(nameof(state)); } debuggerPauseStates.Add(state); }
public static DebuggerPauseState Convert(DBG.DebuggerPauseState ps) { switch (ps.Reason) { case DBG.DebuggerPauseReason.Other: return(new DebuggerPauseState(PauseReason.Other)); case DBG.DebuggerPauseReason.UnhandledException: return(new DebuggerPauseState(PauseReason.UnhandledException)); case DBG.DebuggerPauseReason.Exception: return(new DebuggerPauseState(PauseReason.Exception)); case DBG.DebuggerPauseReason.DebugEventBreakpoint: var deb = (DBG.DebugEventBreakpointPauseState)ps; return(new EventBreakpointPauseState(deb.Breakpoint.Tag as IEventBreakpoint ?? NullEventBreakpoint.Instance)); case DBG.DebuggerPauseReason.AnyDebugEventBreakpoint: var adeb = (DBG.AnyDebugEventBreakpointPauseState)ps; return(new AnyEventBreakpointPauseState(adeb.Breakpoint.Tag as IAnyEventBreakpoint ?? NullAnyEventBreakpoint.Instance)); case DBG.DebuggerPauseReason.Break: return(new DebuggerPauseState(PauseReason.Break)); case DBG.DebuggerPauseReason.ILCodeBreakpoint: var ilbp = (DBG.ILCodeBreakpointPauseState)ps; return(new ILBreakpointPauseState(ilbp.Breakpoint.Tag as IILBreakpoint ?? NullILBreakpoint.Instance)); case DBG.DebuggerPauseReason.NativeCodeBreakpoint: var nbp = (DBG.NativeCodeBreakpointPauseState)ps; return(new NativeBreakpointPauseState(nbp.Breakpoint.Tag as INativeBreakpoint ?? NullNativeBreakpoint.Instance)); case DBG.DebuggerPauseReason.Step: return(new StepPauseState((DebugStepReason)((DBG.StepPauseState)ps).StepReason)); case DBG.DebuggerPauseReason.UserBreak: return(new DebuggerPauseState(PauseReason.UserBreak)); case DBG.DebuggerPauseReason.Eval: return(new DebuggerPauseState(PauseReason.Eval)); default: return(new DebuggerPauseState(PauseReason.Other)); } }
public void AddPauseState(DebuggerPauseState state) { if (state == null) throw new ArgumentNullException(); debuggerPauseStates.Add(state); }