Unsaved files on a disconnected connection cannot be saved and prevent successful reconnection
@aeschli is already working on this.
Since Mar 19, 2025.
Assessment
This issue has not been assessed yet.
Description
- VSCode Version: 1.98.2
- Local OS Version: Windows_NT x64 10.0.19045
- Remote OS Version: Ubuntu 20.04.6 LTS
- Remote Extension/Connection Type: WSL
Essentially identical to the closed issue here: https://github.com/microsoft/vscode-remote-release/issues/8969, except with WSL rather than SSH.
However, the consequences are much more severe in this case because the file can not even be saved locally (to the Windows file system) as a workaround.
Steps to Reproduce:
- Open VS Code on windows and connect to WSL
- Open a file stored on the WSL system, make some edits, do not save
- Open PowerShell and run
wsl --shutdown - Restart WSL with
wsl - Observe that you are unable to reconnect to WSL (unless all VS Code windows have been closed)
- Observe that you are unable to Save / SaveAs the unsaved file to the windows filesystem (unexpected) or to the WSL filesystem (expected due to the connection issue)
This is especially problematic if you have many unsaved files open, or for files such as IPython Notebooks where you can't simply copy/paste the content elsewhere while you shut down VS Code and reconnect.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
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.
More from microsoft/vscode-remote-release
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/vscode-remote-release#11650 ·
-
ssh
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/vscode-remote-release#11583 ·
-
ssh
Difficulty 4/5 3-5 days Newbie friendliness 38/100
microsoft/vscode-remote-release#11861 ·
-
microsoft/vscode-remote-release#11860 · 1 comment · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
microsoft/vscode-remote-release#11859 ·