public void BreakHandler(dbgEventReason reason, ref dbgExecutionAction execAction)
        {
            try
            {
                if (reason == dbgEventReason.dbgEventReasonBreakpoint)
                {
                    //Break due to break point
                    var currentBreakpoint = dte.Debugger.BreakpointLastHit;
                    var matchedTalkpoint  = MatchTalkPoint(currentBreakpoint);
                    if (null == matchedTalkpoint)
                    {
                        return;
                    }
                    //Go on
                    matchedTalkpoint.Execute();

                    if (matchedTalkpoint.doesContinue)
                    {
                        execAction = dbgExecutionAction.dbgExecutionActionGo;
                    }
                }
                else if (reason == dbgEventReason.dbgEventReasonExceptionNotHandled)
                {
                    //Break due to unhandled exception
                    System.Windows.Forms.MessageBox.Show("Break due to excpetion. " +
                                                         "Reason: " + reason.ToString());
                }
            }
            catch (Exception)
            {
                //Catching exception to prevent Visual Studio crashing.
            }
        }
Beispiel #2
0
 private void _debuggerEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     FireLastEvent();
     StartEvent(DebuggerMode.Break, reason.ToString(), executionAction.ToString());
     CheckIfDebuggingStopped(reason);
 }
Beispiel #3
0
 private void _debuggerEvents_OnEnterDesignMode(dbgEventReason reason)
 {
     FireLastEvent();
     StartEvent(DebuggerMode.Design, reason.ToString());
     CheckIfDebuggingStopped(reason);
 }
Beispiel #4
0
 public void OnEnterRunModeHandler(dbgEventReason reason)
 {
     System.Windows.Forms.MessageBox.Show("Debugger enters run mode. " +
                                          "Reason: " + reason.ToString());
 }
Beispiel #5
0
 public void BreakHandler(dbgEventReason reason, ref dbgExecutionAction execAction)
 {
     System.Windows.Forms.MessageBox.Show("Debugger enters break mode. " +
                                          "Reason: " + reason.ToString());
 }