Skip to content

Commit 26098ba

Browse files
author
David Karlaš
authored
Merge pull request #1789 from JetBrains/breakpointDeactivationFix
[CorDebug] Proper deactivation of breakpoints
2 parents 140f4da + 3355248 commit 26098ba

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Mono.Debugging.Win32/CorDebuggerSession.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,23 @@ void QueueToHelperThread (Action action)
155155
helperOperationsQueue.Add (action);
156156
}
157157

158+
void DeactivateBreakpoints ()
159+
{
160+
var breakpointsCopy = breakpoints.Keys.ToList ();
161+
foreach (var corBreakpoint in breakpointsCopy) {
162+
try {
163+
corBreakpoint.Activate (false);
164+
}
165+
catch (Exception e) {
166+
DebuggerLoggingService.LogMessage ("Exception in DeactivateBreakpoints(): {0}", e);
167+
}
168+
}
169+
}
170+
158171
void TerminateDebugger ()
159172
{
160173
helperOperationsCancellationTokenSource.Cancel();
161-
Breakpoints.Clear ();
174+
DeactivateBreakpoints ();
162175
lock (terminateLock) {
163176
if (terminated)
164177
return;

0 commit comments

Comments
 (0)