Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Visual Studio (NOT VS Code) do remote ssh development? The docs says yes, but

This seems like it ought to be solved with a google search, but I've been looking really hard for the past hour and can't find it. There are many links saying Visual Studio (not VS Code) supports remote ssh development (for instance https://docs.microsoft.com/en-us/cpp/linux/connect-to-your-remote-linux-computer?view=vs-2019 ) but none actually show the final step. Can Visual Studio remote develop on linux without installing the code locally?

On VS Code, the feature to remote develop over SSH lets you specify the remote address and then you don't even need the code locally cause all editing and debugging is remote. Does Visual Studio have that feature too? The above link shows how to setup a connection to a machine, but then I can't find any way to actually connect to that machine to browse for the project. How does remote development work in Visual Studio? It seems like I can copy the code locally on my windows box and it will copy the code and build it on linux? But is there not an option like VS Code has where the code lives remotely on the linux box and VS just uses ssh to read it?

like image 800
user2543623 Avatar asked Sep 10 '20 01:09

user2543623


People also ask

How do I develop on a remote SSH server using Visual Studio Code?

Connect to a remote host# In VS Code, select Remote-SSH: Connect to Host... from the Command Palette (F1, Ctrl+Shift+P) and use the same user@hostname as in step 1. If VS Code cannot automatically detect the type of server you are connecting to, you will be asked to select the type manually.

Can you SSH from VS Code?

VS Code Remote SSH SSH, or the secure shell protocol, lets you access a remote computer or virtual machine securely over a network connection. You can connect over SSH into another machine from Visual Studio Code and interact with files and folders anywhere on that remote filesystem.

What is VS Code remote development?

Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured development environment. You can: Develop on the same operating system you deploy to or use larger or more specialized hardware.

How add SSH key to VS Code?

Add SSH key to your VM# Select Use existing public key in the dropdown for SSH public key source so that you can use the public key you just generated. Take the public key and paste it into your VM setup, by copying the entire contents of the id_ed25519. pub in the SSH public key.


1 Answers

The only way I have found is with remote debugging. First you have to copy the binaries to the Linux machine. Then you can debug the program with remote debugging. But actually a bit cumbersome in contrast to VS Code remote.

Here a link from the Microsoft documentation with detailed instructions: https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging-dotnet-core-linux-with-ssh?view=vs-2019

Hopefully there will be a better solution in the future.I don't like VS Code either.

like image 106
Patrick Steurer Avatar answered Oct 20 '22 21:10

Patrick Steurer