microsoft / microsoft/vscode-remote-release
SSH Connection Failed - Tabs/UI state lost
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I did not ask the @remote-ssh participant for help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I did not try step 2 of the troubleshooting steps
Remote-SSH Log
n/a - happened late last night, didn't think to save anything
Expected Behavior
n/a
Actual Behavior
n/a
Steps To Reproduce
Version: 1.106.3
Remote: Debian Trixie on WSL2, connecting over SSH
Anything else?
Similar to this closed issue: VSCode+SSH closes all open tabs on connection failure, losing developer workspace state
I haven't been able to reproduce it, but the conditions were:
Launch VSCode (Windows). It automatically opens the previous editor session, which was a folder on the remote via SSH. The connection failed - I mistakenly had activated a VPN session on Windows - I think I closed the connection error dialogue box using the 'X', and then clicked on one of the unpopulated editor tabs; this generated a second error dialogue, I think about being unable to connect. The next attempt (after dropping the VPN and ensuring the remote was viable) I attempted to connect via File > Recent Files, the session connected successfully but the UI state was flushed/blank.
This is the second or third time this has happened over the past few years, but the first involving a VPN.
My preventative measure now has been to set "window.restoreWindows": "none", and manually connect to the SSH host first before attempting to open any folders/workspaces, so that if the connection fails it won't flush any editor sessions.
I can see a few previous issues surrounding this and also many requests about preserving the UI state beyond vscodes own state.vscdb files. If there isn't any solution forthcoming - multiple issues seem to be closed already - then perhaps there should be a warning in the documentation or editor itself about allowing the editor to populate itself with the previous sessions tabs/UI if it was via SSH, so that in case of failure the state isn't lost.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named, and the report has no logs or reliable reproduction. Start by investigating the failed SSH connection flow described for restored windows, then determine whether tabs and UI state remain available after the connection fails and a later connection succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- desktop, developer-experience
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100