-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Labels
Description
The debugger in the async pipeline consumer is implemented, but is not yet hooked up to the UI.
This is done by sending messages back to the client to ensure it's kept in sync with VSCode.
Most of these are done with the debug adapter protocol, but we still need be able to start and stop the debugger from the server.
The key is for us to make sure the client debugger is active when the debugger stops. That's done today like this:
Lines 2417 to 2420 in 9e1a17a
if (!IsDebugServerActive) | |
{ | |
_languageServer.SendNotification("powerShell/startDebugger"); | |
} |
We'll need to implement that here:
Lines 298 to 311 in a0a8df1
private void OnDebuggerStopped(object sender, DebuggerStopEventArgs debuggerStopEventArgs) | |
{ | |
DebugContext.SetDebuggerStopped(debuggerStopEventArgs); | |
try | |
{ | |
CurrentPowerShell.WaitForRemoteOutputIfNeeded(); | |
PushPowerShellAndRunLoop(_psFactory.CreateNestedPowerShell(CurrentRunspace), PowerShellFrameType.Debug | PowerShellFrameType.Nested); | |
CurrentPowerShell.ResumeRemoteOutputIfNeeded(); | |
} | |
finally | |
{ | |
DebugContext.SetDebuggerResumed(); | |
} | |
} |
Note that I've already tried simply putting this in, but it doesn't just work, so needs to be debugged and worked through