Browse Source

Continue postponed to OnDebuggingPaused()

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@191 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 21 years ago
parent
commit
76201bc9de
  1. 6
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs
  2. 19
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggerEvents/DebuggingPausedEventHandler.cs
  3. 8
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs

6
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs

@ -338,7 +338,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -338,7 +338,7 @@ namespace ICSharpCode.SharpDevelop.Services
exceptionHistory.Add(debugger.CurrentThread.CurrentException);
if (debugger.CurrentThread.CurrentException.ExceptionType != ExceptionType.DEBUG_EXCEPTION_UNHANDLED && (debugger.CatchHandledExceptions == false)) {
// Ignore the exception
Continue();
e.ResumeDebuggingAfterEvent();
return;
}
@ -355,11 +355,11 @@ namespace ICSharpCode.SharpDevelop.Services @@ -355,11 +355,11 @@ namespace ICSharpCode.SharpDevelop.Services
case ExceptionForm.Result.Break:
break;
case ExceptionForm.Result.Continue:
Continue();
e.ResumeDebuggingAfterEvent();
return;
case ExceptionForm.Result.Ignore:
System.Diagnostics.Debug.Fail("Not implemented");
Continue();
e.ResumeDebuggingAfterEvent();
return;
}
}

19
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/DebuggerEvents/DebuggingPausedEventHandler.cs

@ -12,12 +12,31 @@ namespace DebuggerLibrary @@ -12,12 +12,31 @@ namespace DebuggerLibrary
public class DebuggingPausedEventArgs : System.EventArgs
{
PausedReason reason;
bool resumeDebugging = false;
public PausedReason Reason {
get {
return reason;
}
}
internal bool ResumeDebugging {
get {
return resumeDebugging;
}
}
/// <summary>
/// Call this function to resume debugging when event is handled
///
/// This is prefered to calling Continue() since it ensures Continue is
/// called only once and never before all events are handled
/// </summary>
public void ResumeDebuggingAfterEvent()
{
resumeDebugging = true;
}
public DebuggingPausedEventArgs(PausedReason reason)
{

8
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger.cs

@ -145,7 +145,11 @@ namespace DebuggerLibrary @@ -145,7 +145,11 @@ namespace DebuggerLibrary
{
TraceMessage ("Debugger event: OnDebuggingPaused(" + reason.ToString() + ")");
if (DebuggingPaused != null) {
DebuggingPaused(null, new DebuggingPausedEventArgs(reason));
DebuggingPausedEventArgs args = new DebuggingPausedEventArgs(reason);
DebuggingPaused(null, args);
if (args.ResumeDebugging) {
Continue();
}
}
}
@ -343,7 +347,7 @@ namespace DebuggerLibrary @@ -343,7 +347,7 @@ namespace DebuggerLibrary
public VariableCollection LocalVariables {
get {
if (!IsDebugging) return null;
if (!IsDebugging) return VariableCollection.Empty;
return CurrentProcess.LocalVariables;
}
}

Loading…
Cancel
Save