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

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

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

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

@ -25,26 +25,6 @@ namespace Debugger.AddIn.Options
public DebuggingOptionsPanel() public DebuggingOptionsPanel()
{ {
InitializeComponent(); 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() public override bool SaveOptions()

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

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

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

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

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

@ -13,31 +13,17 @@ namespace Debugger
StepOverNoSymbols = true; StepOverNoSymbols = true;
StepOverDebuggerAttributes = true; StepOverDebuggerAttributes = true;
StepOverAllProperties = false; StepOverAllProperties = false;
StepOverSingleLineProperties = false;
StepOverFieldAccessProperties = true; StepOverFieldAccessProperties = true;
Verbose = false;
SymbolsSearchPaths = new string[0]; SymbolsSearchPaths = new string[0];
PauseOnHandledExceptions = false; PauseOnHandledExceptions = false;
} }
public bool EnableJustMyCode { get; set; } public bool EnableJustMyCode { get; set; }
public bool StepOverNoSymbols { get; set; } public bool StepOverNoSymbols { get; set; } // Decompilation
public bool StepOverDebuggerAttributes { get; set; } public bool StepOverDebuggerAttributes { get; set; }
public bool StepOverAllProperties { get; set; } public bool StepOverAllProperties { get; set; }
public bool StepOverSingleLineProperties { get; set; }
public bool StepOverFieldAccessProperties { get; set; } public bool StepOverFieldAccessProperties { get; set; }
public bool Verbose { get; set; }
public string[] SymbolsSearchPaths { get; set; } public string[] SymbolsSearchPaths { get; set; }
public bool PauseOnHandledExceptions { 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
NotifyResumed(action); NotifyResumed(action);
corProcess.Continue(0); corProcess.Continue(0);
if (this.Options.Verbose) { // this.TraceMessage("Continue");
this.TraceMessage("Continue");
}
if (action == DebuggeeStateAction.Clear) { if (action == DebuggeeStateAction.Clear) {
OnResumed(); OnResumed();

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

@ -373,9 +373,6 @@ namespace Debugger
get { get {
Options opt = this.Process.Options; Options opt = this.Process.Options;
if (opt.DecompileCodeWithoutSymbols)
return false;
if (opt.StepOverNoSymbols) { if (opt.StepOverNoSymbols) {
if (this.SymMethod == null) return true; if (this.SymMethod == null) return true;
} }
@ -401,10 +398,6 @@ namespace Debugger
internal void MarkAsNonUserCode() internal void MarkAsNonUserCode()
{ {
((ICorDebugFunction2)this.CorFunction).SetJMCStatus(0 /* false */); ((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) public override bool Equals(object obj)

Loading…
Cancel
Save