microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.68k stars 295 forks source link

`Remote SSH: Kill current VS Code server` doesn't work #10114

Open ShuguangSun opened 3 months ago

ShuguangSun commented 3 months ago

Command Remote SSH: Kill current VS Code server doesn't work using the most updated code server. As it is expected to be installed in the folder .vscode-server\cli instead of .vscode-server\bin. So it raise error message and log like

Get-Process node | Where-Object Path -match ".*\\.vscode-server.*\\bin\\.*" | ForEach-Object {Stop-Process -Id $_.Id}
> PS C:\Users\xxxx> Remove-Item -Force -Recurse $env:USERPROFILE\.vscode-server\bin
> +             Remove-Item -Force -Recurse $env:USERPROFILE\.vscode-serv ...
> +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     + CategoryInfo          : ObjectNotFound: (C:\Users\xxx\.vscode-server\bin:String) [Remove-Item], ItemNotFoun 
>    dException
>     + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
m-mit commented 2 days ago

Maybe related with https://github.com/microsoft/vscode-remote-release/issues/10403

~Disabling remote.SSH.useLocalServer~ works for me on Windows host. EDIT: Disabling remote.SSH.useExecServer works for me.

ShuguangSun commented 2 days ago

Yes. It works for me by disabling remote.SSH.useExecServer.