Пример #1
0
 public void OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction)
 {
     foreach (var watchItem in WatchItems)
     {
         OnWatchItemLoading(watchItem);
     }
 }
Пример #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;
     }
 }
Пример #3
0
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (Reason == dbgEventReason.dbgEventReasonBreakpoint)
     {
         SetSoundForSingleEvent(IDEEventType.Breakepoint, false);
     }
 }
Пример #4
0
 /// <summary>
 /// Exit debug mode. Disable dump controls.
 /// </summary>
 private void DebuggerEvents_OnEnterRunMode(dbgEventReason reason)
 {
     if (_dumpMemory != null)
     {
         _dumpMemory.IsDebugging = false;
     }
 }
Пример #5
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);
            }
        }
Пример #6
0
        private static void Events_OnEnterDesignMode(dbgEventReason Reason)
        {
            lock (_sync)
            {
                switch (Reason)
                {
                case dbgEventReason.dbgEventReasonEndProgram:
                case dbgEventReason.dbgEventReasonLaunchProgram:
                case dbgEventReason.dbgEventReasonStopDebugging:
                case dbgEventReason.dbgEventReasonDetachProgram:
                case dbgEventReason.dbgEventReasonExceptionThrown:
                case dbgEventReason.dbgEventReasonExceptionNotHandled:
                    Project proj = VSPackage.GetActiveProject();
                    if (proj != null && Debugging && (DateTime.Now - LastQuery).TotalSeconds > 1)
                    {
                        Debugging = false;
                        LastQuery = DateTime.Now;
                        OnProjectDebuggingStop?.Invoke(proj);
                    }
                    break;

                default:
                    break;
                }
            }
        }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (ExpressionLoader.Debugger.CurrentMode == dbgDebugMode.dbgBreakMode)
     {
         UpdateItems(true);
     }
 }
Пример #8
0
 private void _debuggerEvents_OnEnterRunMode(dbgEventReason Reason)
 {
     if (IsCESharpSolution)
     {
         OutputPane.Log("Running...");
     }
 }
Пример #9
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.
            }
        }
Пример #10
0
        private void OnEnterDesignMode(dbgEventReason reason)
        {
            ThreadHelper.ThrowIfNotOnUIThread();
            BreakpointManager bpm = new BreakpointManager(package: m_package);

            bpm.DisableSuspendedFromOperationBreakpoints();
        }
Пример #11
0
 void debuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
 {
     if (Reason == dbgEventReason.dbgEventReasonEndProgram || Reason == dbgEventReason.dbgEventReasonDetachProgram || Reason == dbgEventReason.dbgEventReasonStopDebugging)
     {
     }
     traceSessionInProgress = false;
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (m_debugger.CurrentMode == dbgDebugMode.dbgBreakMode)
     {
         UpdateItems();
     }
 }
        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;
        }
 private void OnEnterRunMode(dbgEventReason Reason)
 {
     if (_options.PauseWhileDebugging && !_isPaused)
     {
         _isPaused = true;
         _autoShelve.Stop();
     }
 }
 private void OnEnterDesignMode(dbgEventReason Reason)
 {
     if (_isPaused)
     {
         _autoShelve.CreateShelveset();
         _autoShelve.Start();
         _isPaused = false;
     }
 }
Пример #16
0
 void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     SafeExecute(() =>
     {
         if (AfterDebuggerEnterBreakMode != null)
         {
             AfterDebuggerEnterBreakMode(this, EventArgs.Empty);
         }
     });
 }
Пример #17
0
        private void DebuggerEvents_OnEnterRunMode(dbgEventReason Reason)
        {
            if (!_debuggerRunning && reasonIsStartDebugger(Reason))
            {
                _debuggerRunning = true;

                _preDebugSession = new Session("preDebugSession");
                _controller.FillDocumentsInSession(_preDebugSession);
            }
        }
Пример #18
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);
     }
 }
Пример #19
0
 private void CheckIfDebuggingStopped(dbgEventReason reason)
 {
     switch (reason)
     {
     case dbgEventReason.dbgEventReasonStopDebugging:
     case dbgEventReason.dbgEventReasonDetachProgram:
     case dbgEventReason.dbgEventReasonEndProgram:
         FireLastEvent();
         break;
     }
 }
 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();
     }
 }
 private void OnEnterRunMode(dbgEventReason Reason)
 {
     if (Reason == dbgEventReason.dbgEventReasonLaunchProgram)
     {
         JoinableTaskFactory.Run(async() =>
         {
             await JoinableTaskFactory.SwitchToMainThreadAsync();
             ReadSolutionEnvironment();
         });
     }
 }
Пример #22
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);
     }
 }
Пример #23
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);
        }
Пример #24
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);
            }
        }
Пример #25
0
        /// <summary>
        /// Called when Visual Studio ends a debugging session.
        /// Shuts down the web server and debugger.
        /// </summary>
        /// <param name="reason">The parameter is not used.</param>
        private void DebuggerOnEnterDesignMode(dbgEventReason reason)
        {
            if (debugger_ != null)
            {
                debugger_.Dispose();
                debugger_ = null;
            }

            if (webServer_ != null)
            {
                webServer_.Dispose();
                webServer_ = null;
            }
        }
Пример #26
0
        private void DebuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
        {
            if (_debuggerRunning && reasonIsStopDebugger(Reason))
            {
                _debuggerRunning = false;

                try
                {
                    if (_settingsManager.DsmSettings.RestoreOpenedDocumentsAfterDebug)
                    {
                        var postDebugSession = new Session("postDebugSession");
                        _controller.FillDocumentsInSession(postDebugSession);

                        bool documentsChanged = false;

                        if (_preDebugSession.GetDocuments().Count() != postDebugSession.GetDocuments().Count())
                        {
                            documentsChanged = true;
                        }
                        else
                        {
                            var postDebugSessionDocs = postDebugSession.GetDocuments();
                            foreach (var doc in _preDebugSession.GetDocuments())
                            {
                                if (!postDebugSessionDocs.Contains(doc))
                                {
                                    documentsChanged = true;
                                    break;
                                }
                            }
                        }

                        if (documentsChanged)
                        {
                            if (!_settingsManager.DsmSettings.AskConfirmationRestoreDocs ||
                                _viewAdapter.AskForConfirmation("Do you want to restore the documents as they were before start debugging ?\r\n" +
                                                                "(Please note that closed documents can be re-opened later through the 'Recently Closed Documents' addin button)"))
                            {
                                _controller.LoadDocumentsFromSession(_preDebugSession);
                            }
                        }
                    }
                }
                finally
                {
                    _preDebugSession = null;
                }
            }
        }
Пример #27
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     = "";
             }
         }
     }
 }
Пример #28
0
        private void DebuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
        {
            if (_debuggerRunning && reasonIsStopDebugger(Reason))
              {
            _debuggerRunning = false;

            try
            {
              if (_settingsManager.DsmSettings.RestoreOpenedDocumentsAfterDebug)
              {
            var postDebugSession = new Session("postDebugSession");
            _controller.FillDocumentsInSession(postDebugSession);

            bool documentsChanged = false;

            if (_preDebugSession.GetDocuments().Count() != postDebugSession.GetDocuments().Count())
              documentsChanged = true;
            else
            {
              var postDebugSessionDocs = postDebugSession.GetDocuments();
              foreach (var doc in _preDebugSession.GetDocuments())
              {
                if (!postDebugSessionDocs.Contains(doc))
                {
                  documentsChanged = true;
                  break;
                }
              }
            }

            if (documentsChanged)
            {
              if (!_settingsManager.DsmSettings.AskConfirmationRestoreDocs ||
                _viewAdapter.AskForConfirmation("Do you want to restore the documents as they were before start debugging ?\r\n" +
                "(Please note that closed documents can be re-opened later through the 'Recently Closed Documents' addin button)"))
              {
                _controller.LoadDocumentsFromSession(_preDebugSession);
              }
            }
              }
            }
            finally
            {
              _preDebugSession = null;
            }

              }
        }
Пример #29
0
        private void DebuggerEvents_OnEnterRunMode(dbgEventReason reason)
        {
            NServiceBusDiagramAdapter.MakeDiagramReadOnly(true);
            if (String.IsNullOrEmpty(ServiceControlInstanceURI) ||
                reason != dbgEventReason.dbgEventReasonLaunchProgram)
            {
                return;
            }

            // Write DebugSessionId on Endpoints Bin folder
            var debugSessionId = String.Format("{0}@{1}@{2}", Environment.MachineName, InstanceName, DateTime.Now.ToUniversalTime().ToString("s")).Replace(" ", "_");

            foreach (var endpoint in Design.Endpoints.GetAll())
            {
                var activeConfiguration = endpoint.Project.As <Project>().ConfigurationManager.ActiveConfiguration;
                var outputPath          = activeConfiguration.Properties.Item("OutputPath").Value.ToString();

                var binFolder =
                    Path.IsPathRooted(outputPath)
                        ? outputPath
                        : Path.Combine(Path.GetDirectoryName(endpoint.Project.PhysicalPath), outputPath);

                if (!Directory.Exists(binFolder))
                {
                    Directory.CreateDirectory(binFolder);
                }

                File.WriteAllText(Path.Combine(binFolder, "ServiceControl.DebugSessionId.txt"), debugSessionId);
            }

            // If ServiceInsight is installed and invocation URI registerd
            if (LaunchServiceInsightOnDebug &&
                Registry.ClassesRoot.OpenSubKey("si") != null)
            {
                var url = String.Format("si://{0}?EndpointName={1}.{2}&Search={3}&AutoRefresh={4}",
                                        ServiceControlInstanceURI.Replace("http://", ""),
                                        InstanceName,
                                        Design.Endpoints.GetAll().First().InstanceName,
                                        debugSessionId,
                                        1);

                // Start ServiceInsight with parameters
                Process.Start(url);
            }
        }
Пример #30
0
        private void DebuggerEvents_OnEnterDesignMode(dbgEventReason reason)
        {
            if (reason != dbgEventReason.dbgEventReasonStopDebugging)
            {
                return;
            }

            if (GodotMessagingClient == null || !GodotMessagingClient.IsConnected)
            {
                return;
            }

            var currentDebugTarget = GodotDebugTargetSelection.Instance.CurrentDebugTarget;

            if (currentDebugTarget != null && currentDebugTarget.ExecutionType == ExecutionType.PlayInEditor)
            {
                _ = GodotMessagingClient.SendRequest <StopPlayResponse>(new StopPlayRequest());
            }
        }
Пример #31
0
 /// <summary>
 /// Called when Visual Studio starts a debugging session.
 /// Here we kick off the debugger and web server if appropriate.
 /// </summary>
 /// <param name="reason">Indicates how we are entering run mode (breakpoint or launch).</param>
 private void DebuggerOnEnterRunMode(dbgEventReason reason)
 {
     // If we are starting debugging (not re-entering from a breakpoint)
     // then load project settings and start the debugger-helper.
     if (reason == dbgEventReason.dbgEventReasonLaunchProgram)
     {
         PropertyManager properties = new PropertyManager();
         properties.SetTargetToActive(dte_);
         if (properties.PlatformType == PropertyManager.ProjectPlatformType.NaCl)
         {
             debugger_  = new PluginDebuggerGDB(dte_, properties);
             webServer_ = new WebServer(webServerOutputPane_, properties);
         }
         else if (properties.PlatformType == PropertyManager.ProjectPlatformType.Pepper)
         {
             debugger_  = new PluginDebuggerVS(dte_, properties);
             webServer_ = new WebServer(webServerOutputPane_, properties);
         }
     }
 }
        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);
                }
            }
        }
Пример #33
0
 private void DebuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
 {
     expressionGraph.SetExpression(null);
 }
Пример #34
0
 void _debuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
 {
     _ideMode = enumIDEMode.Design;
     attachWindowEvents();
 }
Пример #35
0
 void _debuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     _ideMode = enumIDEMode.Debug;
     dettachWindowEvents();
 }
Пример #36
0
 /// <summary>
 /// Occurs when debugger enters run mode.
 /// </summary>
 /// <param name="reason">The reason.</param>
 private static void DebuggerEvents_OnEnterRunMode(dbgEventReason reason)
 {
     DebuggerEnteredRunMode?.Invoke();
 }
Пример #37
0
        private void DebuggerEvents_OnEnterRunMode(dbgEventReason reason)
        {
            NServiceBusDiagramAdapter.MakeDiagramReadOnly(true);
            if (String.IsNullOrEmpty(ServiceControlInstanceURI) ||
                reason != dbgEventReason.dbgEventReasonLaunchProgram)
            {
                return;
            }

            // Write DebugSessionId on Endpoints Bin folder
            var debugSessionId = String.Format("{0}@{1}@{2}", Environment.MachineName, InstanceName, DateTime.Now.ToUniversalTime().ToString("s")).Replace(" ", "_");
            foreach (var endpoint in Design.Endpoints.GetAll())
            {
                var activeConfiguration = endpoint.Project.As<Project>().ConfigurationManager.ActiveConfiguration;
                var outputPath = activeConfiguration.Properties.Item("OutputPath").Value.ToString();

                var binFolder =
                    Path.IsPathRooted(outputPath)
                        ? outputPath
                        : Path.Combine(Path.GetDirectoryName(endpoint.Project.PhysicalPath), outputPath);

                if (!Directory.Exists(binFolder))
                {
                    Directory.CreateDirectory(binFolder);
                }

                File.WriteAllText(Path.Combine(binFolder, "ServiceControl.DebugSessionId.txt"), debugSessionId);
            }

            // If ServiceInsight is installed and invocation URI registerd
            if (LaunchServiceInsightOnDebug &&
                Registry.ClassesRoot.OpenSubKey("si") != null)
            {
                var url = String.Format("si://{0}?EndpointName={1}.{2}&Search={3}&AutoRefresh={4}",
                                            ServiceControlInstanceURI.Replace("http://", ""),
                                            InstanceName,
                                            Design.Endpoints.GetAll().First().InstanceName,
                                            debugSessionId,
                                            1);

                // Start ServiceInsight with parameters
                Process.Start(url);
            }
        }
Пример #38
0
 public void OnEnterRunMode(dbgEventReason Reason)
 {
     if (Reason == dbgEventReason.dbgEventReasonLaunchProgram)
     {
         //MessageBox.Show("Hello");
         startupProj = GetStartupSolnProject(_applicationObject);
         //Output("##Loaded" + proj.CodeModel.Language + "\n");
         if (IsVCProject(startupProj))
         {
             shouldTrack = true;
             leakReportPath = Path.Combine(GetWorkingFolder(startupProj), "memory_leak_report.txt");
             Output("############ Visual Leak Detector Filter started\n");
             if (File.Exists(leakReportPath))
             {
                 try
                 {
                     File.Delete(leakReportPath);
                     Output("############ Delete " + leakReportPath + "\n");
                 }
                 catch (System.Exception ex)
                 {
                     OutputException(ex);
                 }
             }
             return;
         }
     }
     shouldTrack = false;
     //MessageBox.Show("Start debugging");
 }
Пример #39
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;
     }
 }
Пример #40
0
 void DebuggerOnEnterDesignMode(dbgEventReason Reason)
 {
     m_debugMode = false;
 }
Пример #41
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;
 }
 private void OnEnterDesignMode(dbgEventReason Reason)
 {
     if (_isPaused)
     {
         _autoShelve.CreateShelveset();
         _autoShelve.Start();
         _isPaused = false;
     }
 }
 void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     SafeExecute(() =>
     {
         if (AfterDebuggerEnterBreakMode != null)
             AfterDebuggerEnterBreakMode(this, EventArgs.Empty);
     });
 }
 private void OnEnterRunMode(dbgEventReason Reason)
 {
     if (_options.PauseWhileDebugging && !_isPaused)
     {
         _isPaused = true;
         _autoShelve.Stop();
     }
 }
Пример #45
0
 void DebuggerOnEnterRunMode(dbgEventReason Reason)
 {
     m_debugMode = true;
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     RedrawGeometries();
 }
Пример #47
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);
 }
Пример #48
0
 /// <summary>
 /// Debug event handler
 /// </summary>
 /// <param name="Reason"></param>
 protected void DebuggerEvents_OnEnterRunMode(dbgEventReason Reason)
 {
     _controlQuickWatch.Enabled = false;
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     if (m_debugger.CurrentMode == dbgDebugMode.dbgBreakMode)
     {
         UpdateItems();
     }
 }
Пример #50
0
 void debuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
 {
     if (Reason == dbgEventReason.dbgEventReasonEndProgram || Reason == dbgEventReason.dbgEventReasonDetachProgram || Reason == dbgEventReason.dbgEventReasonStopDebugging)
     {
     }
     traceSessionInProgress = false;
 }
Пример #51
0
 public void OnEnterDesignMode(dbgEventReason Reason)
 {
     if (Reason == dbgEventReason.dbgEventReasonEndProgram)
     {
         if (shouldTrack)
         {
             if (File.Exists(leakReportPath))
             {
                 string filterPath = GetVLDFilterFile(startupProj);
                 string output = FilterVLDOutput(leakReportPath, filterPath);
                 Output("\n\n" + output);
                 OutputFullFileToPane(leakReportPath);
             }
             else
             {
                 Output("############ VLD report file not detected\n");
             }
         }
     }
 }
Пример #52
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);
         }
     }
 }
 private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction)
 {
     UpdateItems();
 }
Пример #54
0
 /// <summary>
 /// Called when Visual Studio starts a debugging session.
 /// Here we kick off the debugger and web server if appropriate.
 /// </summary>
 /// <param name="reason">Indicates how we are entering run mode (breakpoint or launch).</param>
 private void DebuggerOnEnterRunMode(dbgEventReason reason)
 {
   // If we are starting debugging (not re-entering from a breakpoint)
   // then load project settings and start the debugger-helper.
   if (reason == dbgEventReason.dbgEventReasonLaunchProgram)
   {
     PropertyManager properties = new PropertyManager();
     properties.SetTargetToActive(dte_);
     if (properties.PlatformType == PropertyManager.ProjectPlatformType.NaCl)
     {
       debugger_ = new PluginDebuggerGDB(dte_, properties);
       webServer_ = new WebServer(webServerOutputPane_, properties);
     }
     else if (properties.PlatformType == PropertyManager.ProjectPlatformType.Pepper)
     {
       debugger_ = new PluginDebuggerVS(dte_, properties);
       webServer_ = new WebServer(webServerOutputPane_, properties);
     }
   }
 }
Пример #55
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();
 }
Пример #56
0
 void DebuggerEvents_OnEnterDesignMode(dbgEventReason Reason)
 {
     NServiceBusDiagramAdapter.MakeDiagramReadOnly(false);
 }
Пример #57
0
 void _debuggerEvents_OnEnterRunMode(dbgEventReason Reason)
 {
     _ideMode = enumIDEMode.Run;
     dettachWindowEvents();
 }
Пример #58
0
 private static bool reasonIsStopDebugger(dbgEventReason Reason)
 {
     return (Reason == dbgEventReason.dbgEventReasonEndProgram) ||
     (Reason == dbgEventReason.dbgEventReasonStopDebugging) ||
     (Reason == dbgEventReason.dbgEventReasonDetachProgram);
 }
Пример #59
0
    /// <summary>
    /// Called when Visual Studio ends a debugging session.
    /// Shuts down the web server and debugger.
    /// </summary>
    /// <param name="reason">The parameter is not used.</param>
    private void DebuggerOnEnterDesignMode(dbgEventReason reason)
    {
      if (debugger_ != null)
      {
        debugger_.Dispose();
        debugger_ = null;
      }

      if (webServer_ != null)
      {
        webServer_.Dispose();
        webServer_ = null;
      }
    }
Пример #60
0
 private static bool reasonIsStartDebugger(dbgEventReason Reason)
 {
     return (Reason == dbgEventReason.dbgEventReasonGo) ||
     (Reason == dbgEventReason.dbgEventReasonAttachProgram);
 }