From 83c01eee81ba81eb9a447e32015113fa59ab8cc7 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 21 Nov 2010 18:54:40 +0100 Subject: [PATCH] Fixed bug that caused Error/Warning markers not to reappear after debugging. --- .../Project/Src/Services/Debugger/DebuggerService.cs | 11 +++++++++++ .../Base/Project/Src/Services/Tasks/ErrorPainter.cs | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs index 631f514ff8..168c3f751c 100644 --- a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs +++ b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs @@ -89,6 +89,15 @@ namespace ICSharpCode.SharpDevelop.Debugging } } + static bool debuggerStarted; + + /// + /// Gets whether the debugger is currently active. + /// + public static bool IsDebuggerStarted { + get { return debuggerStarted; } + } + public static event EventHandler DebugStarting; public static event EventHandler DebugStarted; public static event EventHandler DebugStopped; @@ -110,12 +119,14 @@ namespace ICSharpCode.SharpDevelop.Debugging static void OnDebugStarted(object sender, EventArgs e) { + debuggerStarted = true; if (DebugStarted != null) DebugStarted(null, e); } static void OnDebugStopped(object sender, EventArgs e) { + debuggerStarted = false; if (debugFeature != null) debugFeature.EndTracking(); diff --git a/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs b/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs index 98173fc68d..6ca8e06147 100644 --- a/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs +++ b/src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs @@ -72,7 +72,7 @@ namespace ICSharpCode.SharpDevelop void UpdateEnabled() { bool newEnabled = textEditor.Options.UnderlineErrors; - if (DebuggerService.IsDebuggerLoaded && DebuggerService.CurrentDebugger.IsDebugging) + if (DebuggerService.IsDebuggerStarted) newEnabled = false; if (isEnabled != newEnabled) {