vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Call local applications from remote

Open KevinBLT opened this issue 3 years ago • 3 comments

I am doing web development on a remote machine with VSCode SSH Remote.

When starting debug mode, the remote machine will try to run a binary "google-chrome" which I would like to be my local installed chrome instead of the remote one - which would require X11 forwarding and all that stuff.

I hacked around this editing my local ssh_config (MacOS) doing a remote port forwarding to my local port 22 and enable ssh on my MacBook. I added a ssh key from the remote machine to my local machine so I can access my local machine from the remote machine via ssh (using the port from the config that is forwarded with VSCode connecting to the remote machine).

I then created a script under "/usr/bin/google-chrome" which then parses the debug port from the command line arguments and executes my local chrome via SSH using local port forwarding -L and a command to start my local chrome with the same arguments as requested by the remote server.

Now everything is setup and the remote debugger has no idea that it's using my local chrome (since the debug port it requested is available). This is somewhat easy on MacOS but might be harder on Windows.

Is there any way to achieve this automatically?

There should be more use cases for this not only chrome (or another browser). I think VSCode should already now local applications so there could be a mapping like:

[remote binary path ] => [local binary path]

Everything in the remote binary path would would be created by the VSCode extension and forward stdin/out to the local application (and the ports in both directions).

I am happy I found this workaround but I think this might be possible to happen automatically, so VSCode remote behaves more transparently regarding local application starting (if needed).

KevinBLT avatar Jun 10 '22 10:06 KevinBLT

This would be a larger amount of work since when we create the remote window in VS Code we assume very little to no connection to your local environment so it's not immediately easy to do without some substantial work in VS Code core

tanhakabir avatar Jun 10 '22 21:06 tanhakabir

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Jun 10 '22 21:06 vscodenpa

This feature request has not yet received the 10 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding

vscodenpa avatar Jul 31 '22 03:07 vscodenpa

:slightly_frowning_face: In the last 60 days, this feature request has received less than 10 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Aug 11 '22 03:08 vscodenpa