vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Manual reconnect

Open BernierCR opened this issue 5 years ago • 6 comments

Maybe this exists already, but if it does, it's non-obvious.

I would like a way to manually reconnect a remote ssh session. The UI brings up a reconnect box automatically. But sometimes you are not ready to reconnect. And the UI seems to give up on reconnecting pretty quickly. Then you are stuck with a dead workspace and need to reload the whole window.

I know, not a priority, but it would be fantastic if there was a one or two click way to trigger the reconnect logic.

Thank you.

BernierCR avatar Aug 16 '19 18:08 BernierCR

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

vscodebot[bot] avatar Aug 16 '19 18:08 vscodebot[bot]

Similarly, it would be nice to disable automatic reconnect. And just block the editor and require that I hit enter to reconnect.

If you are:

  • Suspending the machine,
  • Have 2FA like a yubikey to touch on reconnect,
  • Have spotty internet in current spot.

It might be nice that it doesn't attempt to reconnect without my say so.

I figure control could just be an option.

jonasfj avatar Sep 12 '19 13:09 jonasfj

Please fix this for daily suspenders.

xgdgsc avatar May 27 '21 09:05 xgdgsc

@BernierCR just curious if the command: Developer: Reload Window suffices for manual reconnect?

tanhakabir avatar Nov 18 '21 06:11 tanhakabir

@tanhakabir I can't speak for BenierCR here, but in my experience Developer: Reload Window does not always work 100% of the time. Sometimes yes, but often I've found it will just hang (I'm not entirely sure how to reproduce it deterministically. It may be related to switching between networks or interfaces).

My solution to this is generally to use Remote: Close Remote Connection followed by Remote-SSH: Connect Current Window to Host..., but this requires that I go dig up the hostname of my remote container again, which is a bit circuitous. Since my container (and as a result, its hostname) changes every few days, I never save them in my ssh config, so they don't show up in the suggested hosts list in the connect dialog either.

tsiemens avatar Jun 24 '22 16:06 tsiemens

Adding to this, if you have unsaved files you have to abort the automatic reconnect otherwise you lose your files. Then the only way to save them is to either open an entirely new window and reconnect there, or copy-paste your files elsewhere and reload , then whichever path you chose you have copy them back, and then save.

Extremely unfriendly workflow

ghost avatar Aug 09 '22 12:08 ghost

Remote vscode windows are not designed to operate in a disconnected state, so yes we force reconnection. You should not lose unsaved files, please open a separate issue with more details if that's still an issue

roblourens avatar Dec 17 '22 03:12 roblourens