Exemple #1
0
 // HACK: public
 public virtual void OnPaused()
 {
     AssertPaused();
     // No real purpose - just additional check
     if (callbackInterface.IsInCallback)
     {
         throw new DebuggerException("Can not raise event within callback.");
     }
     TraceMessage("Debugger event: OnPaused()");
     if (Paused != null)
     {
         foreach (Delegate d in Paused.GetInvocationList())
         {
             if (IsRunning)
             {
                 TraceMessage("Skipping OnPaused delegate because process has resumed");
                 break;
             }
             if (this.TerminateCommandIssued || this.HasExited)
             {
                 TraceMessage("Skipping OnPaused delegate because process has exited");
                 break;
             }
             d.DynamicInvoke(this, new ProcessEventArgs(this));
         }
     }
 }
Exemple #2
0
        internal void OnPaused(DebuggerPausedEventArgs e)
        {
            AssertPaused();
            DisableAllSteppers();

            foreach (var corBreakpoint in tempBreakpoints)
            {
                corBreakpoint.Activate(0);
            }
            tempBreakpoints.Clear();

            // No real purpose - just additional check
            if (callbackInterface.IsInCallback)
            {
                throw new DebuggerException("Can not raise event within callback.");
            }
            TraceMessage("Debugger event: OnPaused()");
            if (Paused != null)
            {
                foreach (EventHandler <DebuggerPausedEventArgs> d in Paused.GetInvocationList())
                {
                    if (IsRunning)
                    {
                        TraceMessage("Skipping OnPaused delegate because process has resumed");
                        break;
                    }
                    if (this.TerminateCommandIssued || this.HasExited)
                    {
                        TraceMessage("Skipping OnPaused delegate because process has exited");
                        break;
                    }
                    d(this, e);
                }
            }
        }