Open prabhah opened 1 year ago
This is a great feature, just like using vscode in wsl.
You can accomplish this by adding a code
executable in your PATH with the following contents:
#!/usr/bin/env bash
dir="$(realpath "${1:-$(pwd)}")"
echo "Opening $dir in VSCode..."
exec mac code --folder-uri "vscode-remote://ssh-remote+$(whoami)@$(hostname)@orb$dir"
Great solution! I did briefly try implementing this but it needs more testing with different code
arguments.
I could use ssh orb
in the terminnal to log in the machine, but when I use Remote-ssh in VScode, something goes wrong
It says
Could not establish connection to "orb": Could not resolve hostname.
And when I turn to connect Localhost:32222 ,it says
Could not establish connection to "localhost": Permission denied (publickey).
I could use
ssh orb
in the terminnal to log in the machine, but when I use Remote-ssh in VScode, something goes wrong It saysCould not establish connection to "orb": Could not resolve hostname.
![]()
And when I turn to connect Localhost:32222 ,it says
Could not establish connection to "localhost": Permission denied (publickey).
![]()
@FantasticRhythm That's not related to this issue. I've replied in #292.
thanks <3 @piperswe
Is your feature request related to a problem? Please describe.
when I use "code" command on the linux virtual machine to open a directory in visual studio code(VSC), VSC opens the directory in local filesystem mode. such as:
on Linux virtual machine: cd /opt/test code .
VSC will be opened on MacOS, but the root path in VSC is ~/OrbStack/ubuntu/opt/test/
Describe the solution you'd like
Open the VSC in SSH mode, the correct path is ssh://orb:/opt/test
Describe alternatives you've considered VSC launched with "code" command does not work properly with my Golang project, I have to open VSC first, then use ssh mode to open the project directory manually.
Additional context Add any other context or screenshots about the feature request here.