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
path: root/main/src
diff options
context:
space:
mode:
authorKeting Yang <ketyang@microsoft.com>2019-11-15 18:38:34 +0300
committermonojenkins <jo.shields+jenkins@xamarin.com>2019-12-19 21:41:03 +0300
commit1f860aa6875ca2cab57f0f3879c1278bfa8caa5e (patch)
tree04b576f2c78121cfbe9d6524af713beb07c8d23a /main/src
parentb77b95cf6eb5c1e7b9857f2e3be64cffe8d6a0ab (diff)
Unblock breakpoints while debugging unit tests
Diffstat (limited to 'main/src')
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs15
-rw-r--r--main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Initializer.cs22
2 files changed, 21 insertions, 16 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
index 867b76e662..18b9c9a50a 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/DebuggingService.cs
@@ -78,7 +78,6 @@ namespace MonoDevelop.Debugger
static BusyEvaluator busyEvaluator;
static StatusBarIcon busyStatusIcon;
static bool isBusy;
- static bool noNeedUpdateFrame;
static public event EventHandler DebugSessionStarted;
static public event EventHandler PausedEvent;
@@ -476,9 +475,7 @@ namespace MonoDevelop.Debugger
StoppedEvent (session, new EventArgs ());
NotifyCallStackChanged ();
- if (!noNeedUpdateFrame) {
- NotifyCurrentFrameChanged ();
- }
+ NotifyCurrentFrameChanged ();
NotifyLocationChanged ();
}).ContinueWith ((t) => {
sessionManager.Dispose ();
@@ -969,9 +966,7 @@ namespace MonoDevelop.Debugger
if (ResumedEvent != null)
ResumedEvent (null, a);
NotifyCallStackChanged ();
- if (!noNeedUpdateFrame) {
- NotifyCurrentFrameChanged ();
- }
+ NotifyCurrentFrameChanged ();
NotifyLocationChanged ();
});
}
@@ -1093,7 +1088,6 @@ namespace MonoDevelop.Debugger
pinnedWatches.InvalidateAll ();
CurrentFrameChanged?.Invoke (null, EventArgs.Empty);
- noNeedUpdateFrame = false;
}
static void NotifyCallStackChanged ()
@@ -1232,7 +1226,6 @@ namespace MonoDevelop.Debugger
currentFrame = value;
Runtime.RunInMainThread (delegate {
NotifyCurrentFrameChanged ();
- noNeedUpdateFrame = true;
});
} else
currentFrame = -1;
@@ -1271,9 +1264,7 @@ namespace MonoDevelop.Debugger
Runtime.RunInMainThread (delegate {
NotifyCallStackChanged ();
- if(!noNeedUpdateFrame) {
- NotifyCurrentFrameChanged ();
- }
+ NotifyCurrentFrameChanged ();
NotifyLocationChanged ();
});
}
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Initializer.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Initializer.cs
index 93749e9961..1aa1ea284d 100644
--- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Initializer.cs
+++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/Initializer.cs
@@ -46,6 +46,7 @@ namespace MonoDevelop.Debugger
Document noSourceDoc;
NoSourceView noSourceView;
string symbolCachePath;
+ bool changingFrame;
protected override void Run ()
{
@@ -67,12 +68,19 @@ namespace MonoDevelop.Debugger
async void OnFrameChanged (object s, EventArgs a)
{
+ if (changingFrame) {
+ return;
+ } else {
+ changingFrame = true;
+ }
if (disassemblyDoc != null && DebuggingService.IsFeatureSupported (DebuggerFeatures.Disassembly))
disassemblyView.Update ();
var frame = DebuggingService.CurrentFrame;
- if (frame == null)
+ if (frame == null) {
+ changingFrame = false;
return;
+ }
FilePath file = frame.SourceLocation.FileName;
@@ -80,8 +88,10 @@ namespace MonoDevelop.Debugger
if (line != -1) {
if (!file.IsNullOrEmpty && File.Exists (file)) {
var doc = await IdeApp.Workbench.OpenDocument (file, null, line, 1, OpenDocumentOptions.Debugger);
- if (doc != null)
+ if (doc != null) {
+ changingFrame = false;
return;
+ }
}
bool alternateLocationExists = false;
if (frame.SourceLocation.FileHash != null) {
@@ -89,8 +99,10 @@ namespace MonoDevelop.Debugger
if (newFilePath != null && File.Exists (newFilePath)) {
frame.UpdateSourceFile (newFilePath);
var doc = await IdeApp.Workbench.OpenDocument (newFilePath, null, line, 1, OpenDocumentOptions.Debugger);
- if (doc != null)
+ if (doc != null) {
+ changingFrame = false;
return;
+ }
}
}
var debuggerOptions = DebuggingService.GetUserOptions ();
@@ -134,8 +146,10 @@ namespace MonoDevelop.Debugger
frame.UpdateSourceFile (downloadLocation);
doc = await IdeApp.Workbench.OpenDocument (downloadLocation, null, line, 1, OpenDocumentOptions.Debugger);
}
- if (doc != null)
+ if (doc != null) {
+ changingFrame = false;
return;
+ }
}
}