Remotely deploy and debug your .NET C# apps via SSH to Linux using Visual Studio 2022.
Get it on the VS MarketPlace!
Visual Studio's "attach to process via SSH" is cute, but it lacks deployment and automatic attaching. This project allows you to do just that on your Linux VM or Raspberry Pi over the network!
Suess Labs consulting is sponsored by Xeno Innovations, Inc.
Now developers can build, deploy and debug projects on their remote Linux (Ubuntu, Raspberry PI, etc) devices! Customize your SSH connection to use either a password or a private key.
If you enjoy using the extension, please give it a ★★★★★ rating on the Visual Studio Marketplace.
The following Linux distrobutions have been validated and are supported.
vsdbg
for you!For GUI app debugging, you can use the Build and Deploy feature, however, you must manually Attach to Process via SSH using Visual Studio at this time.
Linux, we'll need SSH and cURL for access and downloading any missing tools:
sudo apt install openssh-server
sudo apt install curl
Windows:
For GUI projects, you can use Build and Deploy and then manually attach to the process via SSH by using Visual Studio's built-in tool
dotnet MyGuiApp.dll
This will save you 1.5 minutes on every build of manual uploading and updating rights via chown -R
.
For CLI projects, you can use Build and Deploy and then manually attach to the process via SSH by using Visual Studio's built-in tool (similar to above).
You may have to manually interrupt your app via Console.ReadLine();
high-up in your entry-point (i.e. main()
).
dotnet MyCliApp.dll
Console.ReadLine();
)This will save you 1.5 minutes on every build of manual uploading and updating rights via chown -R
.
The following steps are options if you wish to use an SSH Private Key. These steps were written for Windows 10, however, on Linux the steps are similar.
ssh-keygen -m PEM -t rsa -b 4096
ssh-keygen
.. just not yet.%UserProfile%\.ssh
(WINOWS)id_rsa.pub
in the directory~/.ssh/
on Linux device~/.ssh/authorized_keys
exists, append the contents of id_rsa.pub
to the next line.id_rsa.pub
and rename it to, authorized_keys
Contributors and Q/A are welcomed!
To contribute, please pick off an item from the project or issue page. We'd love to hear your enhancement ideas as well.
Copyright 2024 Xeno Innovations, Inc.