Browse Source

Redesigned debugging options panel in XAML.

pull/16/merge
mkonicek 15 years ago
parent
commit
bbdf7cd77b
  1. 2
      src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.addin
  2. 5
      src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj
  3. 3
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs
  4. 39
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml
  5. 29
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs
  6. 2
      src/AddIns/Debugger/Debugger.AddIn/Visualizers/Commands/ObjectGraphVisualizerCommand.cs
  7. 3
      src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
  8. 5
      src/AddIns/Debugger/Debugger.Core/Options.cs
  9. 7
      src/AddIns/Debugger/Debugger.Core/Process.cs
  10. 2
      src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsHelper.cs
  11. 3
      src/Main/ICSharpCode.Core.Presentation/OptionBinding.cs

2
src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.addin

@ -167,7 +167,7 @@ @@ -167,7 +167,7 @@
insertbefore = "TextEditorOptions">
<OptionPanel id = "General"
label = "${res:Dialog.Options.IDEOptions.General}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.DebuggingOptionsPanel"/>
class = "Debugger.AddIn.Options.DebuggingOptionsPanel"/>
<OptionPanel id = "Symbols"
label = "${res:Dialog.Options.IDEOptions.Debugging.Symbols}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.DebuggingSymbolsPanel"/>

5
src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj

@ -98,6 +98,10 @@ @@ -98,6 +98,10 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Options\DebuggingOptionsPanel.xaml.cs">
<DependentUpon>DebuggingOptionsPanel.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Pads\CallStackPad.xaml.cs">
<DependentUpon>CallStackPad.xaml</DependentUpon>
<SubType>Code</SubType>
@ -392,6 +396,7 @@ @@ -392,6 +396,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Page Include="Options\DebuggingOptionsPanel.xaml" />
<Page Include="Pads\CallStackPad.xaml" />
<Page Include="Pads\Controls\ConditionCell.xaml" />
<Page Include="Pads\Controls\SimpleListViewControl.xaml" />

3
src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs

@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the BSD license (for details please see \src\AddIns\Debugger\Debugger.AddIn\license.txt)
using System;
using System.Drawing;
using System.Windows.Forms;
using Debugger;
using ICSharpCode.Core;
@ -10,6 +12,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -10,6 +12,7 @@ namespace ICSharpCode.SharpDevelop.Services
{
public enum ShowIntegersAs { Auto, Decimal, Hexadecimal };
[Serializable]
public class DebuggingOptions: Options
{
public static DebuggingOptions Instance {

39
src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
<gui:OptionPanel x:Class="Debugger.AddIn.Options.DebuggingOptionsPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:sd="http://icsharpcode.net/sharpdevelop/core"
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop"
xmlns:debugger="clr-namespace:ICSharpCode.SharpDevelop.Services;assembly=Debugger.AddIn"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets">
<StackPanel>
<GroupBox Margin="5" Header="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping}">
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<CheckBox x:Name="chbStepOverFieldAccessProperties"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverFieldAccessProperties}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverFieldAccessProperties}" />
<CheckBox x:Name="chbStepOverSingleLineProperties"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverSingleLineProperties}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverSingleLineProperties}" />
<CheckBox x:Name="chbStepOverAllProperties"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverAllProperties}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverAllProperties}" />
<CheckBox x:Name="chbStepOverDebuggerAttributes"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverDebuggerAttributes}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverDebuggerAttributes}" />
<CheckBox x:Name="chbStepOverNoSymbols"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverNoSymbols}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverNoSymbols}" />
<CheckBox x:Name="chbEnableJustMyCode"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.EnableJustMyCode}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.EnableJustMyCode}" />
</widgets:StackPanelWithSpacing>
</GroupBox>
<GroupBox Margin="5" Header="{sd:Localize Dialog.Options.IDEOptions.Debugging.Exceptions}">
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<CheckBox x:Name="chbPauseOnHandledExceptions"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.PauseOnHandledExceptions}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.PauseOnHandledExceptions}" />
</widgets:StackPanelWithSpacing>
</GroupBox>
</StackPanel>
</gui:OptionPanel>

29
src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using ICSharpCode.SharpDevelop.Gui;
namespace Debugger.AddIn.Options
{
/// <summary>
/// Interaction logic for DebuggingOptionsPanel.xaml
/// </summary>
public partial class DebuggingOptionsPanel : OptionPanel
{
public DebuggingOptionsPanel()
{
InitializeComponent();
}
}
}

2
src/AddIns/Debugger/Debugger.AddIn/Visualizers/Commands/ObjectGraphVisualizerCommand.cs

@ -10,6 +10,7 @@ using Debugger.AddIn.Visualizers.Graph; @@ -10,6 +10,7 @@ using Debugger.AddIn.Visualizers.Graph;
using Debugger.MetaData;
using ICSharpCode.SharpDevelop.Debugging;
using Debugger.AddIn.Visualizers.Utils;
using ICSharpCode.SharpDevelop.Services;
namespace Debugger.AddIn.Visualizers
{
@ -45,6 +46,7 @@ namespace Debugger.AddIn.Visualizers @@ -45,6 +46,7 @@ namespace Debugger.AddIn.Visualizers
{
if (this.Expression == null)
return;
System.Windows.MessageBox.Show("StepOverSingle " + DebuggingOptions.Instance.StepOverSingleLineProperties);
var objectGraphWindow = ObjectGraphWindow.EnsureShown();
objectGraphWindow.ShownExpression = this.Expression;
}

3
src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs

@ -498,7 +498,8 @@ namespace Debugger @@ -498,7 +498,8 @@ namespace Debugger
// Watch out for the zeros and null!
// Exception -> Exception2(pAppDomain, pThread, null, 0, exceptionType, 0);
if ((ExceptionType)exceptionType == ExceptionType.Unhandled || process.PauseOnHandledException) {
if ((ExceptionType)exceptionType == ExceptionType.Unhandled ||
(process.Options != null && process.Options.PauseOnHandledException)) {
process.SelectedThread.CurrentException = new Exception(new Value(process.AppDomains[pAppDomain], process.SelectedThread.CorThread.GetCurrentException()).GetPermanentReference());
process.SelectedThread.CurrentException_DebuggeeState = process.DebuggeeState;
process.SelectedThread.CurrentExceptionType = (ExceptionType)exceptionType;

5
src/AddIns/Debugger/Debugger.Core/Options.cs

@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
using System;
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
namespace Debugger
{
[Serializable]
public class Options
{
public bool EnableJustMyCode = true;
@ -14,5 +16,6 @@ namespace Debugger @@ -14,5 +16,6 @@ namespace Debugger
public bool Verbose = false;
public string[] SymbolsSearchPaths = new string[0];
public bool SuspendOtherThreads = true;
public bool PauseOnHandledException = false;
}
}

7
src/AddIns/Debugger/Debugger.Core/Process.cs

@ -209,15 +209,8 @@ namespace Debugger @@ -209,15 +209,8 @@ namespace Debugger
#region Exceptions
bool pauseOnHandledException = false;
public event EventHandler<ExceptionEventArgs> ExceptionThrown;
public bool PauseOnHandledException {
get { return pauseOnHandledException; }
set { pauseOnHandledException = value; }
}
protected internal virtual void OnExceptionThrown(ExceptionEventArgs e)
{
TraceMessage ("Debugger event: OnExceptionThrown()");

2
src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsHelper.cs

@ -13,7 +13,7 @@ using ICSharpCode.SharpDevelop.Refactoring; @@ -13,7 +13,7 @@ using ICSharpCode.SharpDevelop.Refactoring;
namespace ICSharpCode.SharpDevelop.Refactoring
{
public class ContextActionsPopupHelper
public class ContextActionsHelper
{
public static ContextActionsPopup MakePopupWithDerivedClasses(IClass baseClass)
{

3
src/Main/ICSharpCode.Core.Presentation/OptionBinding.cs

@ -15,7 +15,8 @@ namespace ICSharpCode.Core.Presentation @@ -15,7 +15,8 @@ namespace ICSharpCode.Core.Presentation
/// </summary>
/// <remarks>
/// Properties accessed by this binding have to be managed by a custom
/// settings class, which contains all settings as static properties or fields.<br />
/// settings class, which contains all settings as static properties or fields,
/// or is a singleton class with the standard 'Instance' property.<br />
/// Do not use PropertyService directly!<br />
/// This markup extension can only be used in OptionPanels or other <br />containers implementing IOptionBindingContainer!
/// </remarks>

Loading…
Cancel
Save