Пример #1
0
 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;
 }
Пример #2
0
        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);
            });
        }