Пример #1
0
		/// <summary> Sets up the eviroment and raises user events </summary>
		internal void RaisePausedEvents()
		{
			AssertPaused();
			DisableAllSteppers();
			CheckSelectedStackFrames();
			SelectMostRecentStackFrameWithLoadedSymbols();
			
			if (this.PauseSession.PausedReason == PausedReason.Exception) {
				ExceptionEventArgs args = new ExceptionEventArgs(this, this.SelectedThread.CurrentException, this.SelectedThread.CurrentExceptionType, this.SelectedThread.CurrentExceptionIsUnhandled);
				OnExceptionThrown(args);
				// The event could have resumed or killed the process
				if (this.IsRunning || this.TerminateCommandIssued || this.HasExited) return;
			}
			
			while(BreakpointHitEventQueue.Count > 0) {
				Breakpoint breakpoint = BreakpointHitEventQueue.Dequeue();
				breakpoint.NotifyHit();
				// The event could have resumed or killed the process
				if (this.IsRunning || this.TerminateCommandIssued || this.HasExited) return;
			}
			
			OnPaused();
			// The event could have resumed the process
			if (this.IsRunning || this.TerminateCommandIssued || this.HasExited) return;
		}
Пример #2
0
        /// <summary> Sets up the eviroment and raises user events </summary>
        internal void RaisePausedEvents()
        {
            AssertPaused();
            DisableAllSteppers();
            CheckSelectedStackFrames();
            SelectMostRecentStackFrameWithLoadedSymbols();

            // if CurrentException is set an exception has occurred.
            if (SelectedThread.CurrentException != null)
            {
                ExceptionEventArgs args = new ExceptionEventArgs(this, this.SelectedThread.CurrentException, this.SelectedThread.CurrentExceptionType, this.SelectedThread.CurrentExceptionIsUnhandled);
                OnExceptionThrown(args);
                // clear exception, it is being processed by the debugger.
                this.SelectedThread.CurrentException = null;
                // The event could have resumed or killed the process
                if (this.IsRunning || this.TerminateCommandIssued || this.HasExited)
                {
                    return;
                }
            }

            while (BreakpointHitEventQueue.Count > 0)
            {
                Breakpoint breakpoint = BreakpointHitEventQueue.Dequeue();
                breakpoint.NotifyHit();
                // The event could have resumed or killed the process
                if (this.IsRunning || this.TerminateCommandIssued || this.HasExited)
                {
                    return;
                }
            }

            OnPaused();
            // The event could have resumed the process
            if (this.IsRunning || this.TerminateCommandIssued || this.HasExited)
            {
                return;
            }
        }