Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@microsoft.com>2020-01-22 18:35:59 +0300
committerGitHub <noreply@github.com>2020-01-22 18:35:59 +0300
commit52a5a0e6919b5e8c30a4644cbfd0ad159b9364d5 (patch)
tree399d367ce4bd8cfabb2a15e9c36325562a5cd732
parent93cd83393834248435a578fd2d97721cdd6ecd8d (diff)
parent9481bffefecbe104982bc97ae91ca8986cae571f (diff)
Merge pull request #3698 from mono/fix-528267
[Debugger] Can't edit function breakpoint
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs7
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs29
2 files changed, 29 insertions, 7 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
index 121c4f12fd..1a9344dbe6 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPad.cs
@@ -218,6 +218,12 @@ namespace MonoDevelop.Debugger
}
}
+ [CommandUpdateHandler (LocalCommands.Properties)]
+ protected void OnUpdateProperties (CommandInfo info)
+ {
+ info.Enabled = !DebuggingService.IsDebugging && tree.Selection.CountSelectedRows () == 1 ;
+ }
+
string GetIconId (BreakEvent bp)
{
if (bp is Catchpoint)
@@ -323,7 +329,6 @@ namespace MonoDevelop.Debugger
}
[CommandUpdateHandler (LocalCommands.GoToFile)]
- [CommandUpdateHandler (LocalCommands.Properties)]
protected void UpdateBpCommand (CommandInfo cmd)
{
cmd.Enabled = tree.Selection.CountSelectedRows () == 1;
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs
index 2d31fada3a..1a92be8320 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/BreakpointPropertiesDialog.cs
@@ -364,6 +364,12 @@ namespace MonoDevelop.Debugger
fb.ParamTypes = parsedParamTypes;
}
+ void SaveCatchpoint (Catchpoint cp)
+ {
+ cp.ExceptionName = entryExceptionType.Text;
+ cp.IncludeSubclasses = checkIncludeSubclass.Active;
+ }
+
class ParsedLocation
{
int line;
@@ -461,14 +467,17 @@ namespace MonoDevelop.Debugger
void OnSave (object sender, EventArgs e)
{
+ bool catchpointSaved = false;
+
if (be == null) {
if (stopOnFunction.Active)
be = new FunctionBreakpoint ("", "C#");
else if (stopOnLocation.Active)
be = breakpointLocation.ToBreakpoint ();
- else if (stopOnException.Active)
+ else if (stopOnException.Active) {
be = new Catchpoint (entryExceptionType.Text, checkIncludeSubclass.Active);
- else
+ catchpointSaved = true;
+ } else
return;
}
@@ -480,6 +489,13 @@ namespace MonoDevelop.Debugger
if (bp != null)
SaveBreakpoint (bp);
+ if (!catchpointSaved) {
+ var cp = be as Catchpoint;
+ if (cp != null) {
+ SaveCatchpoint (cp);
+ }
+ }
+
if ((HitCountMode)ignoreHitType.SelectedItem == HitCountMode.GreaterThanOrEqualTo && (int)ignoreHitCount.Value == 0) {
be.HitCountMode = HitCountMode.None;
} else {
@@ -518,10 +534,11 @@ namespace MonoDevelop.Debugger
}
// Check which radio is selected.
- hboxFunction.Sensitive = stopOnFunction.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints) && !editing;
- hboxLocation.Sensitive = stopOnLocation.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints) && !editing;
- hboxException.Sensitive = stopOnException.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Catchpoints) && !editing;
- checkIncludeSubclass.Sensitive = stopOnException.Active && !editing;
+ var connected = DebuggingService.DebuggerSession != null ? DebuggingService.DebuggerSession.IsConnected : false;
+ hboxFunction.Sensitive = stopOnFunction.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints) && !connected;
+ hboxLocation.Sensitive = stopOnLocation.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Breakpoints) && !connected;
+ hboxException.Sensitive = stopOnException.Active && DebuggingService.IsFeatureSupported (DebuggerFeatures.Catchpoints) && !connected;
+ checkIncludeSubclass.Sensitive = stopOnException.Active;
hboxCondition.Sensitive = DebuggingService.IsFeatureSupported (DebuggerFeatures.ConditionalBreakpoints);
// Check printing an expression.