Browse Source

Removed some debugger options

newNRvisualizers
David Srbecký 13 years ago
parent
commit
82d2924b10
  1. 6
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs
  2. 21
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml
  3. 20
      src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml.cs
  4. 2
      src/AddIns/Debugger/Debugger.AddIn/Pads/CallStackPad.cs
  5. 7
      src/AddIns/Debugger/Debugger.Core/ManagedCallback.cs
  6. 16
      src/AddIns/Debugger/Debugger.Core/Options.cs
  7. 4
      src/AddIns/Debugger/Debugger.Core/Process.cs
  8. 7
      src/AddIns/Debugger/Debugger.Core/StackFrame.cs

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

@ -10,7 +10,7 @@ using ICSharpCode.Core; @@ -10,7 +10,7 @@ using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Services
{
public enum ShowIntegersAs { Decimal, Hexadecimal, Both, Auto };
public enum ShowIntegersAs { Decimal, Hexadecimal, Both };
[Serializable]
public class DebuggingOptions: Options
@ -21,9 +21,9 @@ namespace ICSharpCode.SharpDevelop.Services @@ -21,9 +21,9 @@ namespace ICSharpCode.SharpDevelop.Services
}
}
protected DebuggingOptions()
public DebuggingOptions()
{
ShowIntegersAs = ShowIntegersAs.Auto;
ShowIntegersAs = ShowIntegersAs.Decimal;
DebuggerEventWindowState = FormWindowState.Normal;
DebuggeeExceptionWindowState = FormWindowState.Normal;
}

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

@ -8,28 +8,19 @@ @@ -8,28 +8,19 @@
<StackPanel>
<GroupBox Margin="5" Header="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping}">
<widgets:StackPanelWithSpacing SpaceBetweenItems="5">
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.DecompileCodeWithoutSymbols}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.DecompileCodeWithoutSymbols}" />
<CheckBox x:Name="chbStepOverDebuggerAttributes"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverDebuggerAttributes}"
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverNoSymbols}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverNoSymbols}" />
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverDebuggerAttributes}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverDebuggerAttributes}" />
<CheckBox x:Name="chbStepOverAllProperties"
Checked="ChbStepOverAllProperties_CheckedChanged"
Unchecked="ChbStepOverAllProperties_CheckedChanged"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverAllProperties}"
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverAllProperties}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverAllProperties}" />
<CheckBox x:Name="chbStepOverSingleLineProperties"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverSingleLineProperties}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverSingleLineProperties}" />
<CheckBox x:Name="chbStepOverFieldAccessProperties"
Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverFieldAccessProperties}"
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.Stepping.StepOverFieldAccessProperties}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.StepOverFieldAccessProperties}" />
</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}"
<CheckBox Content="{sd:Localize Dialog.Options.IDEOptions.Debugging.PauseOnHandledExceptions}"
IsChecked="{sd:OptionBinding debugger:DebuggingOptions.PauseOnHandledExceptions}" />
</widgets:StackPanelWithSpacing>
</GroupBox>

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

@ -25,26 +25,6 @@ namespace Debugger.AddIn.Options @@ -25,26 +25,6 @@ namespace Debugger.AddIn.Options
public DebuggingOptionsPanel()
{
InitializeComponent();
ChbStepOverAllProperties_CheckedChanged(null, null);
}
/// <summary>
/// If stepOverAllProperties is true when the panel is opened then the CheckChanged event is
/// fired during the InitializeComponent method call before the remaining check boxes are created.
/// So check if the remaining check boxes have been created.
/// </summary>
void ChbStepOverAllProperties_CheckedChanged(object sender, RoutedEventArgs e)
{
if (IsPanelInitialized()) {
bool stepOverAllProperties = chbStepOverAllProperties.IsChecked.GetValueOrDefault(false);
chbStepOverSingleLineProperties.IsEnabled = !stepOverAllProperties;
chbStepOverFieldAccessProperties.IsEnabled = !stepOverAllProperties;
}
}
bool IsPanelInitialized()
{
return chbStepOverSingleLineProperties != null;
}
public override bool SaveOptions()

2
src/AddIns/Debugger/Debugger.AddIn/Pads/CallStackPad.cs

@ -104,7 +104,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads @@ -104,7 +104,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads
if (item.Frame.Process.IsPaused) {
if (item.Frame != null) {
// check for options - if these options are enabled, selecting the frame should not continue
if (!item.Frame.HasSymbols && !item.Frame.Process.Options.DecompileCodeWithoutSymbols) {
if (!item.Frame.HasSymbols && !item.Frame.Process.Options.StepOverNoSymbols) {
MessageService.ShowMessage("${res:MainWindow.Windows.Debug.CallStack.CannotSwitchWithoutSymbolsOrDecompiledCodeOptions}",
"${res:MainWindow.Windows.Debug.CallStack.FunctionSwitch}");
return;

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

@ -100,8 +100,7 @@ namespace Debugger @@ -100,8 +100,7 @@ namespace Debugger
// Ignore events during property evaluation
process.AsyncContinue(DebuggeeStateAction.Keep);
} else if (pauseOnNextExit) {
if (process.Options.Verbose)
process.TraceMessage("Callback exit: Paused");
// process.TraceMessage("Callback exit: Paused");
process.DisableAllSteppers();
if (pausedEventArgs != null) {
@ -333,8 +332,8 @@ namespace Debugger @@ -333,8 +332,8 @@ namespace Debugger
EnterCallback("CreateProcess", pProcess);
// Process is added in NDebugger.Start
// disable NGen
if (!this.process.Options.EnableJustMyCode && !this.process.Options.StepOverNoSymbols) {
// disable NGen if we want to do decompilation
if (!this.process.Options.StepOverNoSymbols) {
ICorDebugProcess2 pProcess2 = pProcess as ICorDebugProcess2;
if (pProcess2 != null && Process.DebugMode == DebugModeFlag.Debug) {
try {

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

@ -13,31 +13,17 @@ namespace Debugger @@ -13,31 +13,17 @@ namespace Debugger
StepOverNoSymbols = true;
StepOverDebuggerAttributes = true;
StepOverAllProperties = false;
StepOverSingleLineProperties = false;
StepOverFieldAccessProperties = true;
Verbose = false;
SymbolsSearchPaths = new string[0];
PauseOnHandledExceptions = false;
}
public bool EnableJustMyCode { get; set; }
public bool StepOverNoSymbols { get; set; }
public bool StepOverNoSymbols { get; set; } // Decompilation
public bool StepOverDebuggerAttributes { get; set; }
public bool StepOverAllProperties { get; set; }
public bool StepOverSingleLineProperties { get; set; }
public bool StepOverFieldAccessProperties { get; set; }
public bool Verbose { get; set; }
public string[] SymbolsSearchPaths { get; set; }
public bool PauseOnHandledExceptions { get; set; }
bool decompileCodeWithoutSymbols;
public bool DecompileCodeWithoutSymbols {
get { return decompileCodeWithoutSymbols; }
set {
decompileCodeWithoutSymbols = value;
EnableJustMyCode = !decompileCodeWithoutSymbols;
StepOverNoSymbols = !decompileCodeWithoutSymbols;
}
}
}
}

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

@ -477,9 +477,7 @@ namespace Debugger @@ -477,9 +477,7 @@ namespace Debugger
NotifyResumed(action);
corProcess.Continue(0);
if (this.Options.Verbose) {
this.TraceMessage("Continue");
}
// this.TraceMessage("Continue");
if (action == DebuggeeStateAction.Clear) {
OnResumed();

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

@ -373,9 +373,6 @@ namespace Debugger @@ -373,9 +373,6 @@ namespace Debugger
get {
Options opt = this.Process.Options;
if (opt.DecompileCodeWithoutSymbols)
return false;
if (opt.StepOverNoSymbols) {
if (this.SymMethod == null) return true;
}
@ -401,10 +398,6 @@ namespace Debugger @@ -401,10 +398,6 @@ namespace Debugger
internal void MarkAsNonUserCode()
{
((ICorDebugFunction2)this.CorFunction).SetJMCStatus(0 /* false */);
if (this.Process.Options.Verbose) {
this.Process.TraceMessage("Funciton {0} marked as non-user code", this.MethodInfo.FullName);
}
}
public override bool Equals(object obj)

Loading…
Cancel
Save