Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
put disable debugger back with new conditions
  • Loading branch information
KirkMunro committed Jun 5, 2019
commit 7d7766dc21cb3cf0042075acae432bbbae91ed83
12 changes: 12 additions & 0 deletions src/System.Management.Automation/engine/debugger/debugger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,18 @@ internal void RemoveBreakpoint(Breakpoint breakpoint)

breakpoint.RemoveSelf(this);

if (_idToBreakpoint.Count == 0 &&
_currentDebuggerAction != DebuggerResumeAction.StepInto &&
_currentDebuggerAction != DebuggerResumeAction.StepOver &&
_currentDebuggerAction != DebuggerResumeAction.StepOut)
{
// Turn off debugging if the last breakpoint was removed,
// and if we are not currently stepping in the debugger.
// This allows the remainder of the script to run more
// efficiently.
SetInternalDebugMode(InternalDebugMode.Disabled);
}

OnBreakpointUpdated(new BreakpointUpdatedEventArgs(breakpoint, BreakpointUpdateType.Removed, _idToBreakpoint.Count));
}

Expand Down