镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Fix up debugger attach handlers - #2130

Merged
Andy Jordan (andyleejordan) merged 1 commit into
mainfrom
andyleejordan/fixup-debug-configs
Jan 25, 2024
Merged

Andy Jordan (andyleejordan) merged 1 commit into
mainfrom
andyleejordan/fixup-debug-configs

Conversation

@andyleejordan

@andyleejordan Andy Jordan (andyleejordan) commented Jan 13, 2024 •

Copy link
Copy Markdown
Member

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
Andy Jordan (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
Andy Jordan (andyleejordan) added this pull request to the merge queue Jan 25, 2024
Merged via the queue into main with commit 6cffb4a Jan 25, 2024
@andyleejordan
Andy Jordan (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.

2 participants