From 6ed9b4fa038b1ddc133e72e5359b5703695db086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Tue, 26 Jul 2005 15:38:40 +0000 Subject: [PATCH] Fixed function switching bug, debugger window acivated if debugee pauses git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@261 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs | 1 + .../Project/Src/Debugger/NDebugger-StateControl.cs | 4 ++-- .../Debugger/Debugger.Core/Project/Src/Threads/Function.cs | 2 +- .../Debugger/Debugger.Core/Project/Src/Threads/Process.cs | 2 +- .../Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs index f441ce54e3..3f37573b5e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Src/Service/WindowsDebugger.cs @@ -394,6 +394,7 @@ namespace ICSharpCode.SharpDevelop.Services public void JumpToCurrentLine() { + WorkbenchSingleton.MainForm.Activate(); SourcecodeSegment nextStatement = debugger.NextStatement; if (nextStatement == null) { DebuggerService.RemoveCurrentLineMarker(); diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger-StateControl.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger-StateControl.cs index 2dba68620e..3e7c6a7ce2 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger-StateControl.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Debugger/NDebugger-StateControl.cs @@ -121,13 +121,13 @@ namespace DebuggerLibrary OnDebuggingPaused(reason); } - internal void FakePause(PausedReason reason) + internal void FakePause(PausedReason reason, bool keepCurrentFunction) { Process process = CurrentProcess; Thread thread = CurrentThread; Function function = CurrentFunction; Resume(); - Pause(reason, process, thread, function); + Pause(reason, process, thread, keepCurrentFunction ? function : null); } internal void Resume() diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs index 49931eec26..8c2da333f5 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Function.cs @@ -335,7 +335,7 @@ namespace DebuggerLibrary corILFrame.CanSetIP((uint)ilOffset); } else { corILFrame.SetIP((uint)ilOffset); - debugger.FakePause(PausedReason.SetIP); + debugger.FakePause(PausedReason.SetIP, false); } } catch { return null; diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs index 9f30ee4043..40736b5bb8 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Process.cs @@ -49,7 +49,7 @@ namespace DebuggerLibrary { CurrentThread = thread; - debugger.FakePause(PausedReason.CurrentThreadChanged); + debugger.FakePause(PausedReason.CurrentThreadChanged, false); } public IList Threads { diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs index ea82abe8b5..5afb71f30e 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/Thread.cs @@ -252,7 +252,7 @@ namespace DebuggerLibrary { CurrentFunction = function; - debugger.FakePause(PausedReason.CurrentFunctionChanged); + debugger.FakePause(PausedReason.CurrentFunctionChanged, true); } public Function LastFunctionWithLoadedSymbols {