public void Initialize(DnDebugger dbg) { Debug.Assert(debugger.Dispatcher.CheckAccess()); Debug.Assert(dbgBreakpoint == null); if (dbgBreakpoint != null) { throw new InvalidOperationException(); } dbgBreakpoint = dbg.CreateAnyDebugEventBreakpoint(HitHandler); dbgBreakpoint.IsEnabled = isEnabled; dbgBreakpoint.Tag = this; }
void CreateStartupAnyDebugBreakEvent(Func <AnyDebugEventBreakpointConditionContext, bool> cond = null) { Debug.Assert(debugger.ProcessState == DebuggerProcessState.Starting); DnAnyDebugEventBreakpoint bp = null; bp = debugger.CreateAnyDebugEventBreakpoint(ctx => { if (cond == null || cond(ctx)) { debugger.RemoveBreakpoint(bp); return(true); } return(false); }); }