private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (m_debugger.CurrentMode == dbgDebugMode.dbgBreakMode)
     {
         UpdateItems();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Enter debug mode. Enable dump controls.
 /// </summary>
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     if (_dumpMemory != null)
     {
         _dumpMemory.IsDebugging = true;
     }
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (ExpressionLoader.Debugger.CurrentMode == dbgDebugMode.dbgBreakMode)
     {
         UpdateItems(true);
     }
 }
Exemplo n.º 4
0
        public static void DebugEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
        {
            switch (Reason)
            {
            case dbgEventReason.dbgEventReasonNone:
            case dbgEventReason.dbgEventReasonGo:
            case dbgEventReason.dbgEventReasonAttachProgram:
            case dbgEventReason.dbgEventReasonDetachProgram:
            case dbgEventReason.dbgEventReasonLaunchProgram:
            case dbgEventReason.dbgEventReasonEndProgram:
            case dbgEventReason.dbgEventReasonStopDebugging:
            case dbgEventReason.dbgEventReasonStep:
            case dbgEventReason.dbgEventReasonBreakpoint:
            case dbgEventReason.dbgEventReasonUserBreak:
            case dbgEventReason.dbgEventReasonContextSwitch:
                ExecutionAction = new Model.ViewModelLocator().MainModel.RuntimeBreakMode();
                break;

            case dbgEventReason.dbgEventReasonExceptionThrown:
            case dbgEventReason.dbgEventReasonExceptionNotHandled:
                new Model.ViewModelLocator().MainModel.ExceptionThrown();
                //ExecutionAction = dbgExecutionAction.dbgExecutionActionGo;

                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(Reason), Reason, null);
            }
        }
Exemplo n.º 5
0
        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.
            }
        }
Exemplo n.º 6
0
 public void OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     foreach (var watchItem in WatchItems)
     {
         OnWatchItemLoading(watchItem);
     }
 }
Exemplo n.º 7
0
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (Reason == dbgEventReason.dbgEventReasonBreakpoint)
     {
         SetSoundForSingleEvent(IDEEventType.Breakepoint, false);
     }
 }
        private void M_DebugEventsReference_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
        {
            List <ImageLocal> locals = this.m_Loader.FilterImages(this.m_Loader.LoadLocals());

            this.m_ViewModel.Items = locals;

            this.m_ViewModel.WindowEnabled = true;
        }
Exemplo n.º 9
0
 /// <summary>
 /// デバッガで中断モード突入時イベントハンドラ
 /// </summary>
 /// <param name="reason"></param>
 /// <param name="executionaction"></param>
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionaction)
 {
     // 未補足の例外が発生した場合
     if (reason == dbgEventReason.dbgEventReasonExceptionNotHandled)
     {
         var friends = Friends.GetRandomFailedMessage();
         var path    = Path.Combine(_projectDirectory, @"Resources\Icons\", friends.IconFileName);
         Notify(path, friends.Speaker, friends.Message);
     }
 }
Exemplo n.º 10
0
 void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     SafeExecute(() =>
     {
         if (AfterDebuggerEnterBreakMode != null)
         {
             AfterDebuggerEnterBreakMode(this, EventArgs.Empty);
         }
     });
 }
Exemplo n.º 11
0
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (Reason == dbgEventReason.dbgEventReasonExceptionNotHandled)
     {
         SendTalk(Config.ExceptionNotHandled);
     }
     else if (Reason == dbgEventReason.dbgEventReasonExceptionThrown)
     {
         SendTalk(Config.ExceptionThrown);
     }
 }
 private void OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction execAction)
 {
     Debug.WriteLine("got here at: " + DateTime.Now.ToShortTimeString());
     if (reason == EnvDTE.dbgEventReason.dbgEventReasonExceptionNotHandled)
     {
         MainWindow frm = new MainWindow(dte, _lastException);
         frm.ShowDialog();
         //frmMain frm = new frmMain(dte, _lastException);
         //frm.ShowDialog();
     }
 }
Exemplo n.º 13
0
        private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
        {
            var old_expr = expressionGraph.GetExpression;

            if (old_expr == null)
            {
                return;
            }
            var new_expr = applicationObject.Debugger.GetExpression(old_expr.Name);

            expressionGraph.SetExpression(new_expr);
        }
Exemplo n.º 14
0
        private void DebuggerEventsOnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
        {
            try
            {
                var outputFile = GetCurrentProjectOutputForCurrentConfiguration();

                _wakatime.HandleActivity(outputFile, false, GetProjectName(), HeartbeatCategory.Debugging);
            }
            catch (Exception ex)
            {
                _logger.Error("DebuggerEventsOnEnterBreakMode", ex);
            }
        }
Exemplo n.º 15
0
 private void OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     if (reason == dbgEventReason.dbgEventReasonStep)
     {
         foreach (Breakpoint bp in m_Dte.Debugger.Breakpoints)
         {
             if (BreakpointStatusCodes.SuspendedFromOperation().Contains(bp.Tag))
             {
                 bp.Enabled = true;
                 bp.Tag     = "";
             }
         }
     }
 }
        private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
        {
            if (m_debugger.CurrentMode == dbgDebugMode.dbgBreakMode)
            {
                for (int index = 0 ; index < listView.Items.Count; ++index)
                {
                    VariableItem variable = (VariableItem)listView.Items[index];

                    Bitmap bmp = null;
                    string type = null;

                    if ( variable.Name != null && variable.Name != "" )
                    {
                        var expression = m_debugger.GetExpression(variable.Name);
                        if (expression.IsValidValue)
                        {
                            // create bitmap
                            bmp = new Bitmap(100, 100);

                            Graphics graphics = Graphics.FromImage(bmp);
                            graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
                            graphics.Clear(System.Drawing.Color.White);

                            if (!ExpressionDrawer.Draw(graphics, m_debugger, variable.Name))
                                bmp = null;

                            type = expression.Type;
                        }
                    }

                    // set new row
                    VariableItem new_variable = new VariableItem(variable.Name, bmp, type);
                    ((System.ComponentModel.INotifyPropertyChanged)new_variable).PropertyChanged += VariableItem_NameChanged;
                    listView.Items.RemoveAt(index);
                    listView.Items.Insert(index, new_variable);
                }
            }
        }
Exemplo n.º 17
0
        private void DebugEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction action)
        {
            DTE2 dte = (DTE2)GetService(typeof(DTE));

            if (reason == dbgEventReason.dbgEventReasonBreakpoint)//Breakpoint is hitted
            {
                SessionService.RegisterHitted(
                    new StepModel
                {
                    CurrentStackFrameFunctionName = dte.Debugger.CurrentStackFrame.FunctionName,
                    BreakpointLastHitName         = dte.Debugger.BreakpointLastHit.Name,
                    CurrentDocument = DocumentModelBuilder.Build(dte.ActiveDocument)
                }
                    );

                SessionService.RegisterStartPathNode(new PathNodeModel
                {
                    StackTrace = dte.Debugger.CurrentThread.StackFrames.Cast <EnvDTE.StackFrame>().Reverse().Select(x => x.FunctionName).ToList()
                });
            }

            if (reason == dbgEventReason.dbgEventReasonStep)//Any debug step (into, over, out)
            {
                SessionService.RegisterStep(new StepModel
                {
                    CurrentCommandStep            = currentCommandStep,
                    CurrentStackFrameFunctionName = dte.Debugger.CurrentStackFrame.FunctionName,
                    CurrentDocument = DocumentModelBuilder.Build(dte.ActiveDocument)
                });

                SessionService.RegisterPathNode(new PathNodeModel
                {
                    CurrentCommandStep = currentCommandStep,
                    StackTrace         = dte.Debugger.CurrentThread.StackFrames.Cast <EnvDTE.StackFrame>().Reverse().Select(x => x.FunctionName).ToList()
                });
            }
        }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     UpdateItems();
 }
Exemplo n.º 19
0
 private void OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     m_Command.Enabled = true;
     m_Command.Visible = true;
 }
Exemplo n.º 20
0
 void _debuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     _ideMode = enumIDEMode.Debug;
     dettachWindowEvents();
 }
Exemplo n.º 21
0
 void _debuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     _ideMode = enumIDEMode.Debug;
     dettachWindowEvents();
 }
Exemplo n.º 22
0
 void OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     FireEventAndUpdateMode(ShellModes.Debug);
 }
Exemplo n.º 23
0
 public void BreakHandler(dbgEventReason reason, ref dbgExecutionAction execAction)
 {
     System.Windows.Forms.MessageBox.Show("Debugger enters break mode. " +
                                          "Reason: " + reason.ToString());
 }
Exemplo n.º 24
0
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     var old_expr = expressionGraph.GetExpression;
     if (old_expr == null)
         return;
     var new_expr = applicationObject.Debugger.GetExpression(old_expr.Name);
     expressionGraph.SetExpression(new_expr);
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     RedrawGeometries();
 }
 void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     SafeExecute(() =>
     {
         if (AfterDebuggerEnterBreakMode != null)
             AfterDebuggerEnterBreakMode(this, EventArgs.Empty);
     });
 }
Exemplo n.º 27
0
 private void debuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     // In practice the enum Reason field doesn't seem to match up very well with
     // reality, we've captured the observed enum values when these events actually occured
     // and used them instead of using the pre-set enum values. They are incorrect in many
     // cases.
     int intReason = (int) Reason;
     switch (intReason)
     {
         case 9: // breakpoint hit
             _soundPlayer.PlayNoise(SoundPlayer.SoundType.BreakpointHit);
             break;
         case 15: // exception hit
             _soundPlayer.PlayNoise(SoundPlayer.SoundType.ExceptionHit);
             break;
         case 8: // step
             _soundPlayer.PlayNoise(SoundPlayer.SoundType.Step);
             break;
     }
 }
Exemplo n.º 28
0
 void mDebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction execAction)
 {
     UpdateUI();
 }
Exemplo n.º 29
0
 /// <summary>
 /// Occurs when debugger enters break mode.
 /// </summary>
 /// <param name="reason">The reason.</param>
 /// <param name="executionAction">The execution action.</param>
 private static void DebuggerEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     DebuggerEnteredBreakMode?.Invoke();
     VSDebugger?.UpdateCache();
 }
Exemplo n.º 30
0
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     _arraysPending = true;
     ShowArrays();
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (m_debugger.CurrentMode == dbgDebugMode.dbgBreakMode)
     {
         UpdateItems();
     }
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     UpdateItems(true);
 }
Exemplo n.º 33
0
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     UpdateItem(currentlyObservedVariable);
 }
 private void OnIdeEvent(dbgEventReason reason, ref dbgExecutionAction executionaction)
 {
     this.OnIdeEvent();
 }
Exemplo n.º 35
0
 public virtual void OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
 }
Exemplo n.º 36
0
 /// <summary>
 /// Debug event handler
 /// </summary>
 /// <param name="Reason"></param>
 /// <param name="ExecutionAction"></param>
 protected void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     _controlQuickWatch.Enabled = true;
 }
Exemplo n.º 37
0
 public void OnEnterBreak(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     m_watch.MenuEnabled = true;
 }
Exemplo n.º 38
0
 private void _debuggerEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     FireLastEvent();
     StartEvent(DebuggerMode.Break, reason.ToString(), executionAction.ToString());
     CheckIfDebuggingStopped(reason);
 }
Exemplo n.º 39
0
 /// <summary>
 /// Occurs when debugger enters break mode.
 /// </summary>
 /// <param name="reason">The reason.</param>
 /// <param name="executionAction">The execution action.</param>
 private static void DebuggerEvents_OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     DebuggerEnteredBreakMode?.Invoke();
     VSDebugger?.UpdateCache();
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     UpdateRegisters();
 }
Exemplo n.º 41
0
 public static void BreakHandler(dbgEventReason reason, ref dbgExecutionAction execAction)
 {
     // UserIndex contains Users One to Four
     for (int i = 0; i < 4; ++i)
     {
         Controller controller = new Controller((UserIndex)i);
         if (controller != null && controller.IsConnected)
         {
             controller.SetVibration(mResetVibration);
         }
     }
 }