-
Notifications
You must be signed in to change notification settings - Fork 10
Configuring
This document outlines the process for installing everything from scratch.
Though this project supports everywhere that .NET (Core) is supported, this section outlines steps for Ubuntu 22.04 LTE. It's recommended to use the official Microsoft Install .NET on Linux guide.
If this is a new Ubuntu VM on Virtual Box, don't forget to install the extensions $ sudo apt install virtualbox-ext-pack
Before getting started, make sure your system has the latest updates.
On your Linux machine install OpenSSH Server and cURL.
sudo apt update
sudo apt install openssh-server
sudo apt install curl
Now test your connection on Windows
ssh USERNAME@IPADDRESS
Run the following commands to add the Microsoft package signing key to your list of trusted keys.
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
Next, install the SDK
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-6.0
For other .NET versions reference the table below
.NET Version | DotNet-SDK-XX.XX |
---|---|
6.0 | dotnet-sdk-6.0 |
5.0 | dotnet-sdk-5.0 |
3.1 | dotnet-sdk-3.1 |
Alternatively, you can manually download it from the Visual Studio Marketplace
- Open Visual Studio
- Extensions > Manage Extensions
- Search for "VS Linux Debugger"
- Install and restart Visual Studio
First, get your remote machine's IP ($ ifconfig
)
- Visual Studio > Tools > Options
- Select, "Linux Debugger" from the treeview
- Input: Remote Host IP Address
- Input: User Name and Password
- Click, OK
Now you're ready to deploy and debug your applications! We'll begin by making a new .NET 6 Console application.
Deployment logging is displayed in the Output Window's "Linux Debugger" dropdown.
After setting your breakpoint, you can now Deploy and Debug!
- Visual Studio > Extensions > Linux Debugger
- Select, Build, Deploy and Debug
To debug Linux GUI applications debugging, I'm currently working on a solution for that. For now, you can still use Build and Deploy followed by manually attaching to the process in Visual Studio to debug it.
- (VS) Linux Debugger > Build and Deploy
- Run the app on the remote machine via,
dotnet MyApp.dll
- (VS) Debug > "Attach to Process..."
- Connection Type to, SSH
- Connection Target: "UserName@IPADDRESS"
<enter>
- If its the first time connecting to the machine
- Input user credentials. Click, Connect
- Check, Managed (.NET Core for Unix)
Your system should begin debugging.
Copyright 2023 Xeno Innovations, Inc.