Browse Source

Remove all breakpoints.

pull/191/merge
Eusebiu Marcu 15 years ago
parent
commit
a731d68963
  1. 3
      Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs
  2. 12
      Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj
  3. 0
      Debugger/ILSpy.Debugger/Images/ContinueDebugging.png
  4. BIN
      Debugger/ILSpy.Debugger/Images/DeleteAllBreakpoints.PNG
  5. 0
      Debugger/ILSpy.Debugger/Images/StepInto.png
  6. 0
      Debugger/ILSpy.Debugger/Images/StepOut.png
  7. 0
      Debugger/ILSpy.Debugger/Images/StepOver.png
  8. 0
      Debugger/ILSpy.Debugger/Images/bug.png
  9. 1
      ICSharpCode.Decompiler/Ast/AstBuilder.cs
  10. 8
      ILSpy.sln
  11. 4
      ILSpy/Commands/RoutedUICommands.cs
  12. 5
      ILSpy/ILSpy.csproj
  13. 22
      ILSpy/MainWindow.xaml
  14. 11
      ILSpy/MainWindow.xaml.cs

3
Debugger/ILSpy.Debugger/AvalonEdit/IconBarMargin.cs

@ -210,6 +210,9 @@ namespace ILSpy.Debugger.AvalonEdit @@ -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)

12
Debugger/ILSpy.Debugger/ILSpy.Debugger.csproj

@ -189,5 +189,17 @@ @@ -189,5 +189,17 @@
<Resource Include="Images\Icons.16x16.Reference.png" />
<Resource Include="Images\Icons.16x16.Struct.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\DeleteAllBreakpoints.PNG" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\bug.png" />
<Resource Include="Images\ContinueDebugging.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\StepInto.png" />
<Resource Include="Images\StepOut.png" />
<Resource Include="Images\StepOver.png" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

0
ILSpy/Images/ContinueDebugging.png → Debugger/ILSpy.Debugger/Images/ContinueDebugging.png

Before

Width:  |  Height:  |  Size: 610 B

After

Width:  |  Height:  |  Size: 610 B

BIN
Debugger/ILSpy.Debugger/Images/DeleteAllBreakpoints.PNG

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

0
ILSpy/Images/StepInto.png → Debugger/ILSpy.Debugger/Images/StepInto.png

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 241 B

0
ILSpy/Images/StepOut.png → Debugger/ILSpy.Debugger/Images/StepOut.png

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

0
ILSpy/Images/StepOver.png → Debugger/ILSpy.Debugger/Images/StepOver.png

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 290 B

0
ILSpy/Images/bug.png → Debugger/ILSpy.Debugger/Images/bug.png

Before

Width:  |  Height:  |  Size: 827 B

After

Width:  |  Height:  |  Size: 827 B

1
ICSharpCode.Decompiler/Ast/AstBuilder.cs

@ -471,6 +471,7 @@ namespace Decompiler @@ -471,6 +471,7 @@ namespace Decompiler
MethodDeclaration astMethod = new MethodDeclaration();
astMethod.AddAnnotation(methodDef);
if (methodMapping != null)
astMethod.AddAnnotation(methodMapping);
astMethod.ReturnType = ConvertType(methodDef.ReturnType, methodDef.MethodReturnType);
astMethod.Name = CleanName(methodDef.Name);

8
ILSpy.sln

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.1.0.7302-alpha
# SharpDevelop 4.1.0.7312-alpha
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{1DEB3B4E-03AC-437C-821D-B09FBFCC3E5B}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILSpy.Debugger", "Debugger\ILSpy.Debugger\ILSpy.Debugger.csproj", "{6D3D0F0D-348D-456A-A6ED-E9BD5EFABB6A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILSpy", "ILSpy\ILSpy.csproj", "{1E85EFF9-E370-4683-83E4-8A3D063FF791}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "SharpTreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}"
@ -106,7 +106,7 @@ Global @@ -106,7 +106,7 @@ Global
{6D3D0F0D-348D-456A-A6ED-E9BD5EFABB6A}.Release|Any CPU.ActiveCfg = Release|x86
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6D3D0F0D-348D-456A-A6ED-E9BD5EFABB6A} = {1DEB3B4E-03AC-437C-821D-B09FBFCC3E5B}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {1DEB3B4E-03AC-437C-821D-B09FBFCC3E5B}
{6D3D0F0D-348D-456A-A6ED-E9BD5EFABB6A} = {1DEB3B4E-03AC-437C-821D-B09FBFCC3E5B}
EndGlobalSection
EndGlobal

4
ILSpy/Commands/RoutedUICommands.cs

@ -31,6 +31,8 @@ namespace ICSharpCode.ILSpy.Commands @@ -31,6 +31,8 @@ namespace ICSharpCode.ILSpy.Commands
StepInto = new RoutedUICommand("Step into", "StepInto", typeof(RoutedUICommands));
StepOver = new RoutedUICommand("Step over", "StepOver", typeof(RoutedUICommands));
StepOut = new RoutedUICommand("Step out", "StepOut", typeof(RoutedUICommands));
RemoveAllBreakpoint = new RoutedUICommand("Remove all breakpoints", "RemoveAllBreakpoint", typeof(RoutedUICommands));
}
public static RoutedUICommand AttachToProcess { get; private set; }
@ -44,5 +46,7 @@ namespace ICSharpCode.ILSpy.Commands @@ -44,5 +46,7 @@ namespace ICSharpCode.ILSpy.Commands
public static RoutedUICommand StepOver { get; private set; }
public static RoutedUICommand StepOut { get; private set; }
public static RoutedUICommand RemoveAllBreakpoint { get; private set; }
}
}

5
ILSpy/ILSpy.csproj

@ -122,12 +122,7 @@ @@ -122,12 +122,7 @@
<Resource Include="Images\Delete.png" />
<Resource Include="Images\ILSpy.ico" />
<Resource Include="Images\FindAssembly.png" />
<Resource Include="Images\bug.png" />
<None Include="app.config" />
<Resource Include="Images\ContinueDebugging.png" />
<Resource Include="Images\StepInto.png" />
<Resource Include="Images\StepOut.png" />
<Resource Include="Images\StepOver.png" />
<None Include="Properties\AssemblyInfo.template.cs" />
<Compile Include="Properties\WPFAssemblyInfo.cs" />
<Compile Include="MainWindow.xaml.cs">

22
ILSpy/MainWindow.xaml

@ -21,6 +21,9 @@ @@ -21,6 +21,9 @@
</ResourceDictionary>
</Window.Resources>
<Window.CommandBindings>
<CommandBinding
Command="routedCommands:RoutedUICommands.RemoveAllBreakpoint"
Executed="RemoveAllBreakpointExecuted" />
<CommandBinding
Command="routedCommands:RoutedUICommands.AttachToProcess"
Executed="AttachToProcessExecuted" />
@ -88,32 +91,39 @@ @@ -88,32 +91,39 @@
<MenuItem Header="_Debugger">
<MenuItem x:Name="AttachMenuItem" Header="Attach to _running application" Command="routedCommands:RoutedUICommands.AttachToProcess">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/bug.png" />
<Image Width="16" Height="16" Source="pack://application:,,,/ILSpy.Debugger;component/Images/bug.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem x:Name="ContinueDebuggingMenuItem" IsEnabled="False" Header="Continue debugging" InputGestureText="F5" Command="routedCommands:RoutedUICommands.ContinueDebugging">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/ContinueDebugging.png" />
<Image Width="16" Height="16" Source="pack://application:,,,/ILSpy.Debugger;component/Images/ContinueDebugging.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem x:Name="StepIntoMenuItem" IsEnabled="False" Header="Step into" InputGestureText="F11" Command="routedCommands:RoutedUICommands.StepInto">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/StepInto.png" />
<Image Width="16" Height="16" Source="pack://application:,,,/ILSpy.Debugger;component/Images/StepInto.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem x:Name="StepOverMenuItem" IsEnabled="False" Header="Step over" InputGestureText="F10" Command="routedCommands:RoutedUICommands.StepOver">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/StepOver.png" />
<Image Width="16" Height="16" Source="pack://application:,,,/ILSpy.Debugger;component/Images/StepOver.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem x:Name="StepOutMenuItem" IsEnabled="False" Header="Step out" Command="routedCommands:RoutedUICommands.StepOut">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/StepOut.png" />
<Image Width="16" Height="16" Source="pack://application:,,,/ILSpy.Debugger;component/Images/StepOut.png" />
</MenuItem.Icon>
</MenuItem>
<MenuItem x:Name="DetachMenuItem" IsEnabled="False"
Header="Detach from running application"
Command="routedCommands:RoutedUICommands.DetachFromProcess"/>
<Separator/>
<MenuItem x:Name="RemoveAllBreakpointsItem" Header="Remove all breakpoints" Command="routedCommands:RoutedUICommands.RemoveAllBreakpoint">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="pack://application:,,,/ILSpy.Debugger;component/Images/DeleteAllBreakpoints.png" />
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="_Help">
<MenuItem Header="_About" Click="AboutClick" />
@ -160,7 +170,7 @@ @@ -160,7 +170,7 @@
/>
<Separator />
<Button x:Name="AttachButton" Command="routedCommands:RoutedUICommands.AttachToProcess" ToolTip="Attach to running process...">
<Image Width="16" Height="16" Source="Images/bug.png" />
<Image Width="16" Height="16" Source="pack://application:,,,/ILSpy.Debugger;component/Images/bug.png" />
</Button>
</ToolBar>
<!-- Main grid separating left pane (treeView) from main pane (textEditor) -->

11
ILSpy/MainWindow.xaml.cs

@ -32,6 +32,7 @@ using ICSharpCode.Decompiler; @@ -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 @@ -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) {

Loading…
Cancel
Save