Same as open a local file "code-insiders bar" can we do the same, from client machine's terminal: "code-insiders ssh://foo.com/home/username/bar"?
It makes us easily open a code directly connect to the remote server. It's different than https://github.com/microsoft/vscode-remote-release/issues/263 where you need to connect to the remote server first.
@roblourens , can we rename this issue to reflect this is general requirement not limited to remote and/or SSH based access?
As designed VSCode launches a project containing a .devcontainer it starts in local mode prompting to reopen in a container.
"Folder contains a dev container configuration file. Reopen folder to develop in a container (learn more)."
I would like to have an option added to the command line to allow the dev container to be opened by default for example:
code-insider /uri-path-to-project-folder --dev-container or
code-insider /uri-path-to-project-folder --mode=dev-container
when this extension is enabled.
The current steps to connect to a remote directory are:
This is compared to just running code path from WSL. Connecting to SSH is relatively very cumbersome and should instead just take an SSH path to replace almost all of these steps.
It's already possible to directly open remote files & folders using --file-uriand --folder-uri
code --file-uri vscode-remote://ssh-remote+myubuntubox/home/x/projects/test.code-workspacecode --folder-uri vscode-remote://ssh-remote+myubuntubox/home/x/projects/fooI added a simpler notation:
code --remote ssh-remote+myubuntubox /home/x/projects/fooThere's still more work needed to give good user feedback if the remote or the path can not resolve
Thank you @aeschli . I tried
code --file-uri vscode-remote://ssh-remote+myubuntubox/home/x/projects/test.code-workspace and code --folder-uri vscode-remote://ssh-remote+myubuntubox/home/x/projects/foo. Both are working. The code --remote ssh-remote+myubuntubox /home/x/projects/foo, however, didn't work. My Remote Development version is 0.178.0 and "Remote -SSH" version is 0.46.1
@yingbo I will be in tomorrows insider build...
Got it, thanks! I like the idea of code --remote ssh-remote+myubuntubox /home/x/projects/foo.
@aeschli How can you do this with (Docker) Remote Containers? I was thinking a simple code --remote . would be nice
Most helpful comment
It's already possible to directly open remote files & folders using
--file-uriand--folder-uricode --file-uri vscode-remote://ssh-remote+myubuntubox/home/x/projects/test.code-workspacecode --folder-uri vscode-remote://ssh-remote+myubuntubox/home/x/projects/fooI added a simpler notation:
code --remote ssh-remote+myubuntubox /home/x/projects/fooThere's still more work needed to give good user feedback if the remote or the path can not resolve