From 5c84fa09c7d14b890a1a643de2a4612d62f212c1 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 16 Jul 2019 12:10:27 -0400 Subject: [Debugger] Log telemetry for async ops that stall out Needed for https://devdiv.visualstudio.com/DevDiv/_workitems/edit/802365/ --- .../MonoDevelop.Debugger/Counters.cs | 1 + .../MonoDevelop.Debugger/DebuggingService.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'main/src/addins') diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs index 4fed6bfbab..c8fd7030f7 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Counters.cs @@ -35,6 +35,7 @@ namespace MonoDevelop.Debugger public static Counter EvaluationStats = InstrumentationService.CreateCounter ("Evaluation Statistics", "Debugger", id: "Debugger.EvaluationStatistics"); public static TimerCounter DebuggerStart = InstrumentationService.CreateTimerCounter ("Debugger Start", "Debugger", id: "Debugger.Start"); public static TimerCounter DebuggerAction = InstrumentationService.CreateTimerCounter ("Debugger Action", "Debugger", id: "Debugger.Action"); + public static Counter DebuggerBusy = InstrumentationService.CreateCounter ("Debugger Busy", "Debugger", id: "Debugger.Busy"); } class DebuggerStartMetadata : CounterMetadata diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs index 9e19487fc4..7f9ec70c8e 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs @@ -905,6 +905,23 @@ namespace MonoDevelop.Debugger await Runtime.RunInMainThread (delegate { busyEvaluator.UpdateBusyState (args); if (args.IsBusy) { + var session = (DebuggerSession) s; + + if (sessions.TryGetValue (session, out var manager)) { + var metadata = new Dictionary { + ["DebuggerType"] = manager.Engine.Id, + ["Debugger.AsyncOperation.Description"] = args.Description, + ["Debugger.EvaluationOptions.AllowDisplayStringEvaluation"] = args.EvaluationContext.Options.AllowDisplayStringEvaluation, + ["Debugger.EvaluationOptions.AllowMethodEvaluation"] = args.EvaluationContext.Options.AllowMethodEvaluation, + ["Debugger.EvaluationOptions.AllowTargetInvoke"] = args.EvaluationContext.Options.AllowTargetInvoke, + ["Debugger.EvaluationOptions.AllowToString"] = args.EvaluationContext.Options.AllowToStringCalls, + ["Debugger.EvaluationOptions.ChunkRawStrings"] = args.EvaluationContext.Options.ChunkRawStrings, + ["Debugger.EvaluationOptions.EvaluationTimeout"] = args.EvaluationContext.Options.EvaluationTimeout, + }; + + Counters.DebuggerBusy.Inc (1, null, metadata); + } + if (busyStatusIcon == null) { busyStatusIcon = IdeApp.Workbench.StatusBar.ShowStatusIcon (ImageService.GetIcon ("md-bug", Gtk.IconSize.Menu)); busyStatusIcon.SetAlertMode (100); -- cgit v1.2.3 From a4547b579661f7d3df238e556e2f778a838122c8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 17 Jul 2019 10:12:08 -0400 Subject: Update main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs Co-Authored-By: Marius Ungureanu --- .../MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main/src/addins') diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs index 7f9ec70c8e..5ed2950d2e 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs @@ -914,7 +914,7 @@ namespace MonoDevelop.Debugger ["Debugger.EvaluationOptions.AllowDisplayStringEvaluation"] = args.EvaluationContext.Options.AllowDisplayStringEvaluation, ["Debugger.EvaluationOptions.AllowMethodEvaluation"] = args.EvaluationContext.Options.AllowMethodEvaluation, ["Debugger.EvaluationOptions.AllowTargetInvoke"] = args.EvaluationContext.Options.AllowTargetInvoke, - ["Debugger.EvaluationOptions.AllowToString"] = args.EvaluationContext.Options.AllowToStringCalls, + ["Debugger.EvaluationOptions.AllowToStringCalls"] = args.EvaluationContext.Options.AllowToStringCalls, ["Debugger.EvaluationOptions.ChunkRawStrings"] = args.EvaluationContext.Options.ChunkRawStrings, ["Debugger.EvaluationOptions.EvaluationTimeout"] = args.EvaluationContext.Options.EvaluationTimeout, }; @@ -1439,9 +1439,9 @@ namespace MonoDevelop.Debugger if (typeSymbol != null && (arity == 0 || arity == typeSymbol.Arity)) { return symbol; } - var namespaceSymbol = symbol as Microsoft.CodeAnalysis.INamespaceSymbol; - if (namespaceSymbol != null) { - return namespaceSymbol; + var namespaceSymbol = symbol as Microsoft.CodeAnalysis.INamespaceSymbol; + if (namespaceSymbol != null) { + return namespaceSymbol; } } return null; -- cgit v1.2.3 From 946215fe4261df2d9c9ff6fee3153f24f462147e Mon Sep 17 00:00:00 2001 From: Vsevolod Kukol Date: Thu, 18 Jul 2019 14:40:32 +0200 Subject: [Ide][Mac] Add Help button support to MessageService --- .../MacPlatform/Dialogs/MacAlertDialogHandler.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'main/src/addins') diff --git a/main/src/addins/MacPlatform/Dialogs/MacAlertDialogHandler.cs b/main/src/addins/MacPlatform/Dialogs/MacAlertDialogHandler.cs index add27baa1b..a117c39102 100644 --- a/main/src/addins/MacPlatform/Dialogs/MacAlertDialogHandler.cs +++ b/main/src/addins/MacPlatform/Dialogs/MacAlertDialogHandler.cs @@ -42,6 +42,23 @@ using MonoDevelop.Components.AtkCocoaHelper; namespace MonoDevelop.MacIntegration { + sealed class AlertDelegate : NSAlertDelegate + { + readonly string HelpUrl; + public AlertDelegate (string helpUrl) + { + HelpUrl = helpUrl; + } + + public override bool ShowHelp (NSAlert alert) + { + if (!string.IsNullOrEmpty (HelpUrl)) { + IdeServices.DesktopService.ShowUrl (HelpUrl); + } + return true; + } + } + class MacAlertDialogHandler : IAlertDialogHandler { public bool Run (AlertDialogData data) @@ -78,6 +95,11 @@ namespace MonoDevelop.MacIntegration alert.MessageText = data.Message.Text; + if (!string.IsNullOrEmpty (data.Message.HelpUrl)) { + alert.Delegate = new AlertDelegate (data.Message.HelpUrl); + alert.ShowsHelp = true; + } + int accessoryViewItemsCount = data.Options.Count; string secondaryText = data.Message.SecondaryText ?? string.Empty; -- cgit v1.2.3 From 8b8bcbf96b4632d4382ff7a6e6da0d71505e7b50 Mon Sep 17 00:00:00 2001 From: Mikayla Hutchinson Date: Thu, 18 Jul 2019 15:17:17 -0400 Subject: Map ShrinkSelection for new editor And map ExpandSelection properly --- .../MonoDevelop.TextEditor/Properties/MonoDevelop.TextEditor.addin.xml | 3 +++ .../MonoDevelop.TextEditor/TextViewContent.Commands.cs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'main/src/addins') diff --git a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor/Properties/MonoDevelop.TextEditor.addin.xml b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor/Properties/MonoDevelop.TextEditor.addin.xml index 977ce7d472..969f61f267 100644 --- a/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor/Properties/MonoDevelop.TextEditor.addin.xml +++ b/main/src/addins/MonoDevelop.TextEditor/MonoDevelop.TextEditor/Properties/MonoDevelop.TextEditor.addin.xml @@ -152,6 +152,9 @@ + + +