Skip to content

Commit c312ed2

Browse files
committed
WIP: All the way to DebuggerSetsVariablesNoConversion now
1 parent 7275b4a commit c312ed2

File tree

2 files changed

+45
-160
lines changed

2 files changed

+45
-160
lines changed

src/PowerShellEditorServices/Services/PowerShell/Debugging/PowerShellDebugContext.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ public void SetDebugResuming(DebuggerResumeAction debuggerResumeAction)
114114
LastStopEventArgs.ResumeAction = debuggerResumeAction;
115115
}
116116

117-
// We need to tell whatever is happening right now in the debug prompt to wrap up so we can continue
118-
// TODO: Except in the case of unit tests?
117+
// We need to tell whatever is happening right now in the debug prompt to wrap up so we
118+
// can continue. However, if the host was initialized with the console REPL disabled,
119+
// then we'd accidentally cancel the debugged task since no prompt is running. We can
120+
// test this by checking if the UI's type as NullPSHostUI is used specifically in this
121+
// scenario. This mostly applies to unit tests.
119122
if (_psesHost.UI is not NullPSHostUI)
120-
// if (debuggerResumeAction is not DebuggerResumeAction.Continue)
121123
{
122124
_psesHost.CancelCurrentTask();
123125
}

0 commit comments

Comments
 (0)