PowerShellEditorServices icon indicating copy to clipboard operation
PowerShellEditorServices copied to clipboard

Delay launch/attach until after config done

Open jborean93 opened this issue 4 months ago • 1 comments

PR Summary

Updates the sequence of launching and attaching scripts until after configuration done is received. This aligns the behviour of starting a debug session with other debug adapters. A side effect of this change is that it is now possible to set breakpoints and do other actions in an attached runspace target during the initialisation.

Also adds a new option NotifyOnAttach for an attach request which will create the PSES.Attached event before calling Debug-Runspace allowing attached scripts to wait for an attach event.

PR Context

Fixes: https://github.com/PowerShell/PowerShellEditorServices/issues/2191 Fixes: https://github.com/PowerShell/PowerShellEditorServices/issues/2245

The changes include the commit from https://github.com/PowerShell/PowerShellEditorServices/pull/2251 which includes some test runner changes and to verify all the recent stuff added by myself work properly. I'll take this out of draft once we know what is happening with #2251.

PR to document new option in vscode-powershell https://github.com/PowerShell/vscode-powershell/pull/5249.

jborean93 avatar Jul 28 '25 22:07 jborean93