Permalink
Browse files

Redesigned debugging options panel in XAML.

  • Loading branch information...
1 parent 1b4fa55 commit bbdf7cd77b8af80dbdeb3c51a9c97dd599ab4585 @mkonicek mkonicek committed Jun 27, 2011
@@ -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"/>
@@ -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 @@
</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" />
@@ -1,15 +1,18 @@
// 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;
namespace ICSharpCode.SharpDevelop.Services
{
public enum ShowIntegersAs { Auto, Decimal, Hexadecimal };
+ [Serializable]
public class DebuggingOptions: Options
{
public static DebuggingOptions Instance {
@@ -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>
@@ -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();
+ }
+ }
+}
@@ -10,6 +10,7 @@
using Debugger.MetaData;
using ICSharpCode.SharpDevelop.Debugging;
using Debugger.AddIn.Visualizers.Utils;
+using ICSharpCode.SharpDevelop.Services;
namespace Debugger.AddIn.Visualizers
{
@@ -45,6 +46,7 @@ public override void Execute()
{
if (this.Expression == null)
return;
+ System.Windows.MessageBox.Show("StepOverSingle " + DebuggingOptions.Instance.StepOverSingleLineProperties);
var objectGraphWindow = ObjectGraphWindow.EnsureShown();
objectGraphWindow.ShownExpression = this.Expression;
}
@@ -498,7 +498,8 @@ public void Exception2(ICorDebugAppDomain pAppDomain, ICorDebugThread pThread, I
// 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;
@@ -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 @@ public class Options
public bool Verbose = false;
public string[] SymbolsSearchPaths = new string[0];
public bool SuspendOtherThreads = true;
+ public bool PauseOnHandledException = false;
}
}
@@ -209,15 +209,8 @@ public unsafe int WriteMemory(ulong address, byte[] buffer)
#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()");
@@ -13,7 +13,7 @@
namespace ICSharpCode.SharpDevelop.Refactoring
{
- public class ContextActionsPopupHelper
+ public class ContextActionsHelper
{
public static ContextActionsPopup MakePopupWithDerivedClasses(IClass baseClass)
{
@@ -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>

0 comments on commit bbdf7cd

Please sign in to comment.