Conversation

andyleejordan

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.

This can just be an `IEnumerable` throughout instead.
Instead of trying repeatedly every time we set a breakpoint.
The way the class properties are accessed changed.
@andyleejordanandyleejordan force-pushed the andschwa/write-output branch from 4381cfc to 6790594 Compare May 5, 2023 20:16
@andyleejordanandyleejordan marked this pull request as ready for review May 5, 2023 20:59
@andyleejordanandyleejordan requested a review from a team May 5, 2023 20:59

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I'd personally remove the enumerable change for maintainability but I'll leave that up to your discretion

…ions

Seems to be the easiest "clean and safe" way to handle this.
Sign up for free to join this conversation on . Already have an account? Sign in to comment
Area-Debugging Issue-BugA bug to squash.
Status: Done

Successfully merging this pull request may close these issues.