Browse Source

Fixed bug that caused Error/Warning markers not to reappear after debugging.

pull/14/head
Daniel Grunwald 15 years ago
parent
commit
83c01eee81
  1. 11
      src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs
  2. 2
      src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs

11
src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs

@ -89,6 +89,15 @@ namespace ICSharpCode.SharpDevelop.Debugging
} }
} }
static bool debuggerStarted;
/// <summary>
/// Gets whether the debugger is currently active.
/// </summary>
public static bool IsDebuggerStarted {
get { return debuggerStarted; }
}
public static event EventHandler DebugStarting; public static event EventHandler DebugStarting;
public static event EventHandler DebugStarted; public static event EventHandler DebugStarted;
public static event EventHandler DebugStopped; public static event EventHandler DebugStopped;
@ -110,12 +119,14 @@ namespace ICSharpCode.SharpDevelop.Debugging
static void OnDebugStarted(object sender, EventArgs e) static void OnDebugStarted(object sender, EventArgs e)
{ {
debuggerStarted = true;
if (DebugStarted != null) if (DebugStarted != null)
DebugStarted(null, e); DebugStarted(null, e);
} }
static void OnDebugStopped(object sender, EventArgs e) static void OnDebugStopped(object sender, EventArgs e)
{ {
debuggerStarted = false;
if (debugFeature != null) if (debugFeature != null)
debugFeature.EndTracking(); debugFeature.EndTracking();

2
src/Main/Base/Project/Src/Services/Tasks/ErrorPainter.cs

@ -72,7 +72,7 @@ namespace ICSharpCode.SharpDevelop
void UpdateEnabled() void UpdateEnabled()
{ {
bool newEnabled = textEditor.Options.UnderlineErrors; bool newEnabled = textEditor.Options.UnderlineErrors;
if (DebuggerService.IsDebuggerLoaded && DebuggerService.CurrentDebugger.IsDebugging) if (DebuggerService.IsDebuggerStarted)
newEnabled = false; newEnabled = false;
if (isEnabled != newEnabled) { if (isEnabled != newEnabled) {

Loading…
Cancel
Save