microsoft / microsoft/vscode-remote-release
Connect in Window forgets current VSCode profile (when not default) unless a recent directory/workspace is chosen
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- 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
Remote-SSH log is not applicable for this issue.
Expected Behavior
When beginning a remote SSH session the currently selected VSCode profile should always be used both for connecting in the current window or a new window.
Actual Behavior
When opening a session to an SSH host while not using the default VSCode profile, the beginning of the remote session will cause the active profile to reset to the default one.
This will happen if connecting in the current window or connecting in a new window.
This will not happen if a recent directory or workspace from a remote host is chosen via the Remote Explorer side bar. In this circumstance the currently active profile is used as expected.
Steps To Reproduce
- Create a VSCode profile and open a new window to it.
- Recommended: Configure this non-default profile to have a different colour scheme so it's obvious which one you're working in.
- Add a remote SSH host.
- Open an SSH connection without specifying a workspace or directory in the remote, e.g.
- Use the Open a Remote Window button in the status bar and choose a host. (Either Connect to Host or Connect Current Window to Host.)
- Use the Remote Explorer in the side bar and choose a host. (Either Connect in Current Window or Connect in New Window.)
- Do not choose a recent directory or workspace from the Remote Explorer side bar.
Anything else?
This issue is not related to the SSH session itself. (That works fine.) This is entirely about how the extension integrates with VSCode, occurring prior to the SSH connection being attempted.
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
Start by tracing the Open a Remote Window status-bar action, the Remote Explorer Connect to Host and Connect Current Window/New Window entry points, and how they pass the active VS Code profile. Reproduce with a non-default profile and compare those paths with opening a recent remote directory or workspace. Done means all connection paths preserve the selected profile before the SSH connection begins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- desktop, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100