Conversation

andyleejordan

First off, the error messages were never actually displayed to the user because the RpcErrorException constructor takes three arguments. Secondly, we do not support attaching to PowerShell Editor Services. It sure looked like we did (because we had special logic for it) but once attached, nothing worked. So it was half-baked. Now we throw an error if the user is trying to do that. Thirdly, because of that half-baked implementation, the process ID field was typed as a string (to support "current" as a shortcut)but that caused a mess here and an error in the VS Code client. Now it's just always an integer. (Same for the runspace ID.) Fourthly, a big mess was cleaned up by refactoring using functions, who'd have thought? Fifth and finally, superfluous version checking around PowerShell <5.1 was removed (as those versions are no longer supported whatsoever).

@andyleejordanandyleejordan force-pushed the andyleejordan/fixup-debug-configs branch from cbb9e09 to 12adcc0 Compare January 16, 2024 23:39
@andyleejordanandyleejordan changed the title WIP: Fix up debugger attach etc. Fix up debugger attach handlers Jan 17, 2024
@andyleejordanandyleejordan marked this pull request as ready for review January 17, 2024 00:07
@andyleejordanandyleejordan requested a review from a team January 17, 2024 00:07
@andyleejordanandyleejordan force-pushed the andyleejordan/fixup-debug-configs branch from 12adcc0 to 2968e35 Compare January 24, 2024 19:13
First off, the error messages were never actually displayed to the user because
the RpcErrorException constructor takes three arguments. Now the second argument
is always (correctly but annoyingly) null.

Secondly, we do not support attaching to PowerShell Editor Services. It sure
looked like we did (because we had special logic for it) but once attached,
nothing worked. So it was half-baked. Now we throw an error if the user is
trying to do that.

Thirdly, because of that half-baked implementation, the process ID field was
typed as a string (to support "current" as a shortcut) but that caused a mess
here and an error in the VS Code client. Now it's just always an integer. (Same
for the runspace ID.)

Fourthly, a big mess was cleaned up by refactoring using functions, who'd have
thought?

Fifth and finally, superfluous version checking around PowerShell <5.1 was
removed (as those versions are no longer supported whatsoever).
@andyleejordanandyleejordan force-pushed the andyleejordan/fixup-debug-configs branch from 2968e35 to 5632cad Compare January 24, 2024 19:17
@andyleejordanandyleejordan added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit 6cffb4a Jan 25, 2024
@andyleejordanandyleejordan deleted the andyleejordan/fixup-debug-configs branch January 25, 2024 19:55
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.