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.
- Build and upload to remote devices
- Remote debugging*
- This is still in the experimental stages. Please use VS' Attach to Process if you have issues
- VS Linux Debugger will automatically detect and install
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:
- Open Visual Studio (VS) > Tools > Options > Linux Debugger
- Input: Remote Host IP address
- Input: Remote's User Name and Password
- VS > Extensions > Linux Debugger > Build, Deploy, Debug
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
- Deploy to remote machine via
- Extensions > Linux Debugger > "Build and Deploy"
- Run GUI app on remote machine
dotnet MyGuiApp.dll
- Debug > "Attach to Process.."
- Connection Type: SSH
- Connection Target: (Remote machine's IP)
- (Select process)
- Click, Attach
- Check, "Managed (.NET Core for Unix)"
- Click, OK
This will save you 1.5 minutes on every build of manual uploading and updating rights via chown -R
.
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.
This document contains the release information for the project.
- Update: Code cleanup
- Update: Moved RSA SHA256 classes into their own files for separation of responsibility
- Update: Enabled
SSH
for remote debugging by default instead of usingPLink
(still experimental) - Removed: Out of date files (.NET 5 sample applications, UpgradeLog.htm, LinuxDebugger-2019.sln)
Contributor: ZeuSWarE GmbH - PR: #62
- Added: The RSA-SHA2-256 for SSH.Net for interpreting private keys made by
ssh-keygen -m PEM -t rsa -b 4096
allowing connecting directly.- Ubuntu 22.04 LTS OpenSSH package does not support the ssh algo:
ssh-rsa
you intended being generating viassh-keygen -m PEM -t rsa -b 4096
by default anymore
- Ubuntu 22.04 LTS OpenSSH package does not support the ssh algo:
- Added: Using a ppk via plink is obsolete if u gen the key via PowerShell
ssh-keygen
, so u have now the option to use the system integrated ssh.exe (PS 6 integrate that by default)
Contributor: Claas Hilbrecht - PR: #59
- Fixed: As per #32 add
vsdbg
constant to debugger full path. - Update: Options descriptions are now more clear about the .NET executable. It's not a path but the dotnet executable.
- Fixed: As per #53, cleaned up exponential Build status messages.
- Added: Submenu item to "Options" to quickly access to Linux Debugger's Options dialog
- Update: Refactored options mechanism in prep for custom profiles.
- Added: Option to set output window focus to Linux Debugger, default=
false
. (PR #46)Tools > Options > Linux Debugger > "Switch to LinuxDbg Output on Build"
- Added: Async BASH and SFTP operations to not lock up Visual Studio (PR #40)
- Added: "Experimental" tag to menu items for Alpha/Beta items. (PR# 41)
Build, Deploy, and Debug
Build, Deploy, and Launch
- Temp disabled in Preview-1
- Added: Deploy and Launch (ALPHA Feature) (PR #36)
- Added: BashSudo (PR #36)
- Update: Default VSDBG path to match Visual Studio 2022's deployed path (
~/.vs-debugger/vs2022/
). (PR #36, #47) - Update: Sample's NuGet package for Prism.Avalonia
- Fixed: Typo, "Build was notsuccessful" (PR #43)
User Contribution
🚀 - Fixed: Auto-install cURL (PR #36)
- Fixed: Reduced duplicate output messages (PR #40)
- Removed: Publish (PR #36)
- Removed: Redundant sample project
- Added: Now comes with PLink embedded. You can still manually set this if you prefer.
- Removed: Option to enable/disable PLink
- Fixed: Remote folder pre-cleanup.
- Added: Upload files async to reduce locking of Visual Studio
- Added: Removal of
launch.json
if it previously existed - Added: More output logging.
- Update: Enhanced Output
- Updated: Output Window drop-down title to "Linux Debugger" from "Remote Debugger"
- Added: Logging to Output window under "Remote Debugging" dropdown
- Update: Do not include
launch.json
in the uploaded.tar.gz
package - Update: Readme notes
- Update: Code cleanup
- Fixed: Remote debugging for PLink
- Fixed: VSDBG default path
- Update: DeleteLaunchJsonAfterBuild set to false by default
- Update: Separated LaunchJson class into separate objects
- Updated: SSH parameters to include
-o
(option) forStrictHostKeyChecking = NO
. - Added: Additional internal logging
- Added: documentation to Launch and Configure classes
- Added: Ability to use SSH KeyFile with or without a passphrase.
- Added: Directions for creating and configuring local and remote devices
- Added: Additional directions in the Docs folder
- Removed: Publish option
- Updated Options page defaults
- Update: Remote output folder is now the assembly name
- Update: Remote output folder only clears intended target sub-folder
- Added: Remote Debugging (still in preview stages..)
- Updated: Branding name
- Removed: Temp disabled remote debugger
- Update: Remote output folder now creates subfolders with the same name as your project.
- Updated: project icon
- Initial release