Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0.1 (Preview 1) #54

Merged
merged 5 commits into from
Dec 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions marketplace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# [VS .NET Linux Debugger](https://github.com/SuessLabs/VsLinuxDebug)

<image align="right" width="200" height="200" src="https://github.com/SuessLabs/VsLinuxDebug/blob/master/docs/TuxDebug.png" />

Remotely deploy and debug your .NET C# apps via SSH to Linux using Visual Studio 2022.

Get it on the [VS MarketPlace](https://marketplace.visualstudio.com/items?itemName=SuessLabs.VSLinuxDebugger)!

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._

## Overview

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_.

### Usage

![Menu Screenshot](https://raw.githubusercontent.com/SuessLabs/VsLinuxDebug/develop/docs/ScreenShot-MenuItems.png)

* 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.

### Getting Started

**Linux**, we'll need **SSH** and **cURL** for access and downloading any missing tools:

```bash
sudo apt install openssh-server
sudo apt install curl
```

**Windows**:

1. Open Visual Studio (VS) > Tools > Options > **Linux Debugger**
2. **Input:** Remote Host IP address
3. **Input:** Remote's User Name and Password
4. VS > Extensions > Linux Debugger > **Build, Deploy, Debug**

![Tools Options](https://raw.githubusercontent.com/SuessLabs/VsLinuxDebug/develop/docs/ScreenShot-ToolsOptions.png)

### Manually Attaching (for GUI apps)

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

1. Deploy to remote machine via
1. Extensions > Linux Debugger > **"Build and Deploy"**
2. Run GUI app on remote machine
1. `dotnet MyGuiApp.dll`
3. Debug > **"Attach to Process.."**
4. Connection Type: **SSH**
5. Connection Target: **(Remote machine's IP)**
6. (Select process)
7. Click, **Attach**
8. Check, **"Managed (.NET Core for Unix)"**
9. Click, **OK**

This will save you 1.5 minutes on every build of manual uploading and updating rights via `chown -R`.

## Developers Wanted

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.

## Revision History

This document contains the release information for the project.

### 2.0.1 (Prev-1)

* 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` :rocket:
* Fixed: Auto-install cURL (PR #36)
* Fixed: Reduced duplicate output messages (PR #40)
* Removed: Publish (PR #36)
* Removed: Redundant sample project

### 1.9.0

* Added: Now comes with PLink embedded. You can still manually set this if you prefer.
* Removed: Option to enable/disable PLink

### 1.8.1

* 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"

### 1.8.0

* 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

### 1.7.0

* 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) for `StrictHostKeyChecking = NO`.
* Added: Additional internal logging
* Added: documentation to Launch and Configure classes

### 1.6.0

* 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

### 1.2.0

* 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.._)

### 1.1.1

* Updated: Branding name
* Removed: Temp disabled remote debugger

### 1.0.1

* Update: Remote output folder now creates subfolders with the same name as your project.
* Updated: project icon

### 1.0.0

* Initial release
45 changes: 21 additions & 24 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [VS .NET Linux Debugger](https://github.com/SuessLabs/RemoteDebug.git)
# [VS .NET Linux Debugger](https://github.com/SuessLabs/VsLinuxDebug)

<image align="right" width="200" height="200" src="https://github.com/SuessLabs/VsLinuxDebug/blob/master/docs/TuxDebug.png" />

Expand Down Expand Up @@ -43,7 +43,25 @@ sudo apt install curl

![Tools Options](docs/ScreenShot-ToolsOptions.png)

### Generating Private Key (optional)
### Manually Attaching (for GUI apps)

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

1. Deploy to remote machine via
1. Extensions > Linux Debugger > **"Build and Deploy"**
2. Run GUI app on remote machine
1. `dotnet MyGuiApp.dll`
3. Debug > **"Attach to Process.."**
4. Connection Type: **SSH**
5. Connection Target: **(Remote machine's IP)**
6. (Select process)
7. Click, **Attach**
8. Check, **"Managed (.NET Core for Unix)"**
9. Click, **OK**

This will save you 1.5 minutes on every build of manual uploading and updating rights via `chown -R`.

## How To Generate Private Key (optional)

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.

Expand All @@ -62,33 +80,13 @@ The following steps are options if you wish to use an SSH Private Key. These ste
3. If it does not exist, simply upload `id_rsa.pub` and rename it to, `authorized_keys`
7. DONE!

## Action Items

### Work-in-Progress Items
## Future Features

* [ ] **Debugging:** Launching of GUI apps for remote debugging
* [ ] **Debugging:** PLink using PPK instead of manual password
* [ ] **Options Window:** Multiple remote profile management
* [ ] **Options Window:** SSH PPK generator assistant tool

### Manually Attaching (for GUI apps)

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

1. Deploy to remote machine via
1. Extensions > Linux Debugger > **"Build and Deploy"**
2. Run GUI app on remote machine
1. `dotnet MyGuiApp.dll`
3. Debug > **"Attach to Process.."**
4. Connection Type: **SSH**
5. Connection Target: **(Remote machine's IP)**
6. (Select process)
7. Click, **Attach**
8. Check, **"Managed (.NET Core for Unix)"**
9. Click, **OK**

This will save you 1.5 minutes on every build of manual uploading and updating rights via `chown -R`.

## Developers Wanted

Contributors and Q/A are welcomed!
Expand All @@ -97,7 +95,6 @@ To contribute, please pick off an item from the project or issue page. We'd love

## References

* Inspired by [VS Mono Debugger](https://github.com/GordianDotNet/VSMonoDebugger) for their amazing Mono cross-platform efforts.
* [PuTTY PLink](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
* [Extension Docs](https://docs.microsoft.com/en-us/visualstudio/extensibility/creating-a-settings-category?view=vs-2022)
* [Extension Sample](https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/Options)
Expand Down
32 changes: 19 additions & 13 deletions src/VsLinuxDebugger/release-notes.md → release-notes.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
# Release Notes

## 2.0.0-Alpha
## Revision History

* Added: Option to set output window focus to Linux Debugger, defaul=`false`. (PR #46)
This document contains the release information for the project.

### 2.0.1 (Prev-1)

* 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`
* `Build, Deploy, and Launch` - _Temp disabled in Preview-1_
* Added: Deploy and Launch (**ALPHA Feature**) (PR #36)
* Added: BashSudo (PR #36)
* Updated: Default VSDBG path to match Visual Studio 2022's deployed path. (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` :rocket:
* Fixed: Auto-install cURL (PR #36)
* Fixed: Reduced duplicate output messages (PR #40)
* Removed: Publish (PR #36)
* Removed: Redundant sample project

## 1.9.0
### 1.9.0

* Added: Now comes with PLink embedded. You can still manually set this if you prefer.
* Removed: Option to enable/disable PLink

## 1.8.1
### 1.8.1

* Fixed: Remote folder pre-cleanup.
* Added: Upload files async to reduce locking of Visual Studio
Expand All @@ -30,14 +36,14 @@
* Update: Enhanced Output
* Updated: Output Window drop-down title to "Linux Debugger" from "Remote Debugger"

## 1.8.0
### 1.8.0

* 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

## 1.7.0
### 1.7.0

* Fixed: Remote debugging for PLink
* Fixed: VSDBG default path
Expand All @@ -47,30 +53,30 @@
* Added: Additional internal logging
* Added: documentation to Launch and Configure classes

## 1.6.0
### 1.6.0

* 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

## 1.2.0
### 1.2.0

* 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.._)

## 1.1.1
### 1.1.1

* Updated: Branding name
* Removed: Temp disabled remote debugger

## 1.0.1
### 1.0.1

* Update: Remote output folder now creates subfolders with the same name as your project.
* Updated: project icon

## 1.0.0
### 1.0.0

* Initial release
4 changes: 2 additions & 2 deletions sandbox/GuiNet5/GuiNet5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.18" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.18" />
<PackageReference Include="Prism.Avalonia" Version="8.1.97" />
<PackageReference Include="Prism.DryIoc.Avalonia" Version="8.1.97" />
<PackageReference Include="Prism.Avalonia" Version="8.1.97.2" />
<PackageReference Include="Prism.DryIoc.Avalonia" Version="8.1.97.2" />
</ItemGroup>
<ItemGroup>
<Compile Update="Views\ShellWindow.axaml.cs">
Expand Down
4 changes: 2 additions & 2 deletions sandbox/GuiNet6/GuiNet6.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.18" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.18" />
<PackageReference Include="Prism.Avalonia" Version="8.1.97" />
<PackageReference Include="Prism.DryIoc.Avalonia" Version="8.1.97" />
<PackageReference Include="Prism.Avalonia" Version="8.1.97.2" />
<PackageReference Include="Prism.DryIoc.Avalonia" Version="8.1.97.2" />
</ItemGroup>
<ItemGroup>
<Compile Update="Views\ShellWindow.axaml.cs">
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion src/VsLinuxDebugger/Commands.Impl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ private void SetMenuTextAndVisibility(object sender, EventArgs e)

if (cmd.CommandID.ID == CommandIds.CmdShowLog
|| cmd.CommandID.ID == CommandIds.CmdDebugOnly
|| cmd.CommandID.ID == CommandIds.CmdShowSettings)
|| cmd.CommandID.ID == CommandIds.CmdShowSettings
|| cmd.CommandID.ID == CommandIds.CmdBuildDeployLaunch)
{
cmd.Enabled = false;
}
Expand Down
1 change: 1 addition & 0 deletions src/VsLinuxDebugger/DebuggerPackage.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<Icon guid="DebugOnly_16x" id="imgDebugOnly" />
<CommandFlag>DynamicVisibility</CommandFlag>
<CommandFlag>TextChanges</CommandFlag>
<CommandFlag>DefaultDisabled</CommandFlag>
<!--<CommandFlag>DefaultDisabled</CommandFlag>-->
<Strings>
<ButtonText>Build, Deploy and Launch (experimental)</ButtonText>
Expand Down
6 changes: 3 additions & 3 deletions src/VsLinuxDebugger/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Xeno Innovations, Inc.")]
[assembly: AssemblyProduct("VS Linux Debugger")]
[assembly: AssemblyCopyright("Copyright 2022 Xeno Innovations, Inc.")]
[assembly: AssemblyCopyright("Copyright 2022-2023 Xeno Innovations, Inc.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -29,5 +29,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.1.0")]
2 changes: 1 addition & 1 deletion src/VsLinuxDebugger/VsLinuxDebugger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<Compile Include="DebuggerPackage.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="release-notes.md">
<Content Include="..\..\release-notes.md">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
Expand Down
Loading