PowerShellEditorServices icon indicating copy to clipboard operation
PowerShellEditorServices copied to clipboard

Synchronize breakpoints between PowerShell and DAP

Open andyleejordan opened this issue 2 years ago • 0 comments

We unfortunately clear all existing breakpoints in the PowerShell session on the initialization of the debug server, essentially overwriting them with the breakpoints set in the UI:

https://github.com/PowerShell/PowerShellEditorServices/blob/dd870ec1887c3cd69f18459d3e226067ab4f2098/src/PowerShellEditorServices/Server/PsesDebugServer.cs#L110-L111

and in the attach handler:

https://github.com/PowerShell/PowerShellEditorServices/blob/381e7fecb8b660c590ad5e1608e9ced7af87d35c/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs#L413-L414

Instead, we should find a way to properly synchronize the breakpoints. As they're set in the console, we should update the DAP, and vice versa.

andyleejordan avatar May 06 '22 18:05 andyleejordan