While debugging the Write-Output bug (hence the branch name) I came across another bug where the server was attempting to load the DSC module repeatedly. The SetLineBreakpoint logic queries for DSC breakpoint capability, which was importing the module, catching the failure to import as an error, and then trying again every single time. Instead we should import (or fail to import) only the first time we try. Also, we don't need to transform the BreakpointDetails list into an array and back, just leave it as IEnumerable.
While debugging the
Write-Output
bug (hence the branch name) I came across another bug where the server was attempting to load the DSC module repeatedly. TheSetLineBreakpoint
logic queries for DSC breakpoint capability, which was importing the module, catching the failure to import as an error, and then trying again every single time. Instead we should import (or fail to import) only the first time we try. Also, we don't need to transform theBreakpointDetails
list into an array and back, just leave it asIEnumerable
.