Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up debugger attach handlers #2130

Merged
merged 1 commit into from Jan 25, 2024

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Jan 13, 2024

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).

@andyleejordan andyleejordan force-pushed the andyleejordan/fixup-debug-configs branch from cbb9e09 to 12adcc0 Compare January 16, 2024 23:39
@andyleejordan andyleejordan changed the title WIP: Fix up debugger attach etc. Fix up debugger attach handlers Jan 17, 2024
@andyleejordan andyleejordan marked this pull request as ready for review January 17, 2024 00:07
@andyleejordan andyleejordan requested a review from a team as a code owner January 17, 2024 00:07
@andyleejordan andyleejordan 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).
@andyleejordan andyleejordan added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit 6cffb4a Jan 25, 2024
9 checks passed
@andyleejordan andyleejordan deleted the andyleejordan/fixup-debug-configs branch January 25, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants