public void OnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction) { foreach (var watchItem in WatchItems) { OnWatchItemLoading(watchItem); } }
/// <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 (Reason == dbgEventReason.dbgEventReasonBreakpoint) { SetSoundForSingleEvent(IDEEventType.Breakepoint, false); } }
/// <summary> /// Exit debug mode. Disable dump controls. /// </summary> private void DebuggerEvents_OnEnterRunMode(dbgEventReason reason) { if (_dumpMemory != null) { _dumpMemory.IsDebugging = false; } }
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); } }
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); } }
private void _debuggerEvents_OnEnterRunMode(dbgEventReason Reason) { if (IsCESharpSolution) { OutputPane.Log("Running..."); } }
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. } }
private void OnEnterDesignMode(dbgEventReason reason) { ThreadHelper.ThrowIfNotOnUIThread(); BreakpointManager bpm = new BreakpointManager(package: m_package); bpm.DisableSuspendedFromOperationBreakpoints(); }
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; } }
void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction) { SafeExecute(() => { if (AfterDebuggerEnterBreakMode != null) { AfterDebuggerEnterBreakMode(this, EventArgs.Empty); } }); }
private void DebuggerEvents_OnEnterRunMode(dbgEventReason Reason) { if (!_debuggerRunning && reasonIsStartDebugger(Reason)) { _debuggerRunning = true; _preDebugSession = new Session("preDebugSession"); _controller.FillDocumentsInSession(_preDebugSession); } }
/// <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); } }
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(); }); } }
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 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 DebuggerEventsOnEnterBreakMode(dbgEventReason reason, ref dbgExecutionAction executionAction) { try { var outputFile = GetCurrentProjectOutputForCurrentConfiguration(); _wakatime.HandleActivity(outputFile, false, GetProjectName(), HeartbeatCategory.Debugging); } catch (Exception ex) { _logger.Error("DebuggerEventsOnEnterBreakMode", ex); } }
/// <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; } }
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; } } }
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_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; } } }
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); } }
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()); } }
/// <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); } } }
private void DebuggerEvents_OnEnterDesignMode(dbgEventReason Reason) { expressionGraph.SetExpression(null); }
void _debuggerEvents_OnEnterDesignMode(dbgEventReason Reason) { _ideMode = enumIDEMode.Design; attachWindowEvents(); }
void _debuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction) { _ideMode = enumIDEMode.Debug; dettachWindowEvents(); }
/// <summary> /// Occurs when debugger enters run mode. /// </summary> /// <param name="reason">The reason.</param> private static void DebuggerEvents_OnEnterRunMode(dbgEventReason reason) { DebuggerEnteredRunMode?.Invoke(); }
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); } }
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"); }
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; } }
void DebuggerOnEnterDesignMode(dbgEventReason Reason) { m_debugMode = false; }
/// <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; }
void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction) { SafeExecute(() => { if (AfterDebuggerEnterBreakMode != null) AfterDebuggerEnterBreakMode(this, EventArgs.Empty); }); }
void DebuggerOnEnterRunMode(dbgEventReason Reason) { m_debugMode = true; }
private void DebuggerEvents_OnEnterBreakMode(dbgEventReason Reason, ref dbgExecutionAction ExecutionAction) { RedrawGeometries(); }
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); }
/// <summary> /// Debug event handler /// </summary> /// <param name="Reason"></param> protected void DebuggerEvents_OnEnterRunMode(dbgEventReason Reason) { _controlQuickWatch.Enabled = false; }
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"); } } } }
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(); }
/// <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(); }
void DebuggerEvents_OnEnterDesignMode(dbgEventReason Reason) { NServiceBusDiagramAdapter.MakeDiagramReadOnly(false); }
void _debuggerEvents_OnEnterRunMode(dbgEventReason Reason) { _ideMode = enumIDEMode.Run; dettachWindowEvents(); }
private static bool reasonIsStopDebugger(dbgEventReason Reason) { return (Reason == dbgEventReason.dbgEventReasonEndProgram) || (Reason == dbgEventReason.dbgEventReasonStopDebugging) || (Reason == dbgEventReason.dbgEventReasonDetachProgram); }
private static bool reasonIsStartDebugger(dbgEventReason Reason) { return (Reason == dbgEventReason.dbgEventReasonGo) || (Reason == dbgEventReason.dbgEventReasonAttachProgram); }