From a731d68963088096a8f4179d43e4c684c4bf06ae Mon Sep 17 00:00:00 2001 From: Eusebiu Marcu Date: Thu, 24 Feb 2011 20:15:49 +0200 Subject: [PATCH] Remove all breakpoints. --- .../AvalonEdit/IconBarMargin.cs | 3 +++ Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj | 14 ++++++++++- .../Images/ContinueDebugging.png | Bin .../Images/DeleteAllBreakpoints.PNG | Bin 0 -> 924 bytes .../ILSpy.Debugger}/Images/StepInto.png | Bin .../ILSpy.Debugger}/Images/StepOut.png | Bin .../ILSpy.Debugger}/Images/StepOver.png | Bin .../ILSpy.Debugger}/Images/bug.png | Bin ICSharpCode.Decompiler/Ast/AstBuilder.cs | 3 ++- ILSpy.sln | 8 +++---- ILSpy/Commands/RoutedUICommands.cs | 4 ++++ ILSpy/ILSpy.csproj | 5 ---- ILSpy/MainWindow.xaml | 22 +++++++++++++----- ILSpy/MainWindow.xaml.cs | 11 +++++++++ 14 files changed, 53 insertions(+), 17 deletions(-) rename {ILSpy => Debugger/ILSpy.Debugger}/Images/ContinueDebugging.png (100%) create mode 100644 Debugger/ILSpy.Debugger/Images/DeleteAllBreakpoints.PNG rename {ILSpy => Debugger/ILSpy.Debugger}/Images/StepInto.png (100%) rename {ILSpy => Debugger/ILSpy.Debugger}/Images/StepOut.png (100%) rename {ILSpy => Debugger/ILSpy.Debugger}/Images/StepOver.png (100%) rename {ILSpy => Debugger/ILSpy.Debugger}/Images/bug.png (100%) diff --git a/Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs b/Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs index 2897bbcd5..98876d212 100644 --- a/Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs +++ b/Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs @@ -210,6 +210,9 @@ namespace ILSpy.Debugger.AvalonEdit InvalidateVisual(); } + if (CurrentType == null) + return; + BreakpointBookmark bm = BookmarkManager.Bookmarks.Find( b => b.TypeName == CurrentType.FullName && b.LineNumber == GetLineFromMousePosition(e) diff --git a/Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj b/Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj index 8d2e7c506..9ae1302ab 100644 --- a/Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj +++ b/Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj @@ -137,7 +137,7 @@ - + @@ -189,5 +189,17 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/ContinueDebugging.png b/Debugger/ILSpy.Debugger/Images/ContinueDebugging.png similarity index 100% rename from ILSpy/Images/ContinueDebugging.png rename to Debugger/ILSpy.Debugger/Images/ContinueDebugging.png diff --git a/Debugger/ILSpy.Debugger/Images/DeleteAllBreakpoints.PNG b/Debugger/ILSpy.Debugger/Images/DeleteAllBreakpoints.PNG new file mode 100644 index 0000000000000000000000000000000000000000..9f1007b8ed8d86f98c810300e41ab77188ffd05d GIT binary patch literal 924 zcmV;N17rM&P)4ZLZUdfIn>~Traq=9<5k+)+ZNhVE|izDOksX@+D(+0-Q<(|&F`Gw_k7RE zIkNQJH`pJNM~8c49T^&uMn^{^CQOuGpEWD*4CmpS#`E1 zD3vGi9xkENun))X0)Efk%K7bIqx!vs=e%IhA5!Hoy`4&e>!b?}HU-_doT2&Z0$t7zA_L_Nn0IKR#3=4a_tEl=X& zVdK9BJ>7oUb<^@@{hCZ#HfpiuWYM@|8_Leyu|xwE$LT8h5nJ9?EE#E>Srm`{O0^mnHgDvP_6x3jl0wbG1sG#us4Xu?dSuuE+dt(m zla64(ld7~fdR&G=x;CxCl#)ViQeq@gz2KrqR}&x0(YdoJUY3lrsUb=V_!Rl!xucMq z!6U;r3|E!#Bxeu|~a zSE^x4Dy&AEdA+F^ONx4A>iQzZC8fyd5#<@HjGt5AB4s z82)~LE`!G1h?-R}TQEluFPI{T6+{W1U1_gk%lNZ!6D*#=gS|QQ84KywOec7%6pzv_ z|Hqo}LSg;%|5QtXJJ)y;HHnaB8h)YO_uE$cKZ?UTV`5mpCV1fijjOrse`xzxXz-^k yLa{fcyBy80xZ4}GN^w3yzblyhe@|G9$^QUvw_=Bq+&dfq0000 - - - - - diff --git a/ILSpy/MainWindow.xaml b/ILSpy/MainWindow.xaml index 32f382db4..303fd36b4 100644 --- a/ILSpy/MainWindow.xaml +++ b/ILSpy/MainWindow.xaml @@ -21,6 +21,9 @@ + @@ -88,32 +91,39 @@ - + - + - + - + - + + + + + + + + @@ -160,7 +170,7 @@ /> diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index bb4a41ebe..b95b636a2 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -32,6 +32,7 @@ using ICSharpCode.Decompiler; using ICSharpCode.ILSpy.TreeNodes; using ICSharpCode.TreeView; using ILSpy.Debugger.AvalonEdit; +using ILSpy.Debugger.Bookmarks; using ILSpy.Debugger.Services; using ILSpy.Debugger.UI; using Microsoft.Win32; @@ -366,6 +367,16 @@ namespace ICSharpCode.ILSpy DebuggerService.CurrentDebugger.StepOut(); } + void RemoveAllBreakpointExecuted(object sender, ExecutedRoutedEventArgs e) + { + for (int i = BookmarkManager.Bookmarks.Count - 1; i >= 0; --i) { + var bookmark = BookmarkManager.Bookmarks[i]; + if (bookmark is BreakpointBookmark) { + BookmarkManager.RemoveMark(bookmark); + } + } + } + protected override void OnKeyUp(KeyEventArgs e) { switch (e.Key) {