RY.Aspire.Debugging.Extensions 0.0.2

dotnet add package RY.Aspire.Debugging.Extensions --version 0.0.2
                    
NuGet\Install-Package RY.Aspire.Debugging.Extensions -Version 0.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RY.Aspire.Debugging.Extensions" Version="0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RY.Aspire.Debugging.Extensions" Version="0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="RY.Aspire.Debugging.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RY.Aspire.Debugging.Extensions --version 0.0.2
                    
#r "nuget: RY.Aspire.Debugging.Extensions, 0.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RY.Aspire.Debugging.Extensions@0.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RY.Aspire.Debugging.Extensions&version=0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=RY.Aspire.Debugging.Extensions&version=0.0.2
                    
Install as a Cake Tool

RY.Aspire.Debugging.Extensions

Overview

RY.Aspire.Debugging.Extensions is a .NET library that provides an extension method for configuring Visual Studio debugging inside Docker containers. This extension adds a custom command to your Aspire resources, enabling you to install and set up the VS debugger with ease.

Learn more about Aspire custom resource commands here.

Installation

Install the package using the .NET CLI:

dotnet add package RY.Aspire.Debugging.Extensions

Usage

Below is a basic example of how to use the extension as a custom command in your Aspire resource:

using RY.Aspire.Debugging.Extensions;

var builder = DistributedApplication.CreateBuilder(args);

// Configure your Docker container with VS debugging support
var apiContainer = builder.AddDockerfile("my-api", "/path/to/api", "src/WebAPI/Dockerfile")
    .WithVsDebug() // This adds the custom command for VS debugger setup in Aspire
    .WithLifetime(ContainerLifetime.Persistent);

// Build and run the application
builder.Build().Run();

Here’s what the Setup VS Debugger command looks like in Aspire’s UI:

Setup VS Debugger command in Aspire

By clicking on this command, the debugger setup process is initiated inside the Docker container.

Additional Resources

For more details on how to attach the Visual Studio debugger to processes running inside a container, please refer to the Visual Studio documentation on attaching to a process.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2 235 5/12/2025
0.0.1 154 3/31/2025

Initial release of the RY.Aspire.Debugging.Extensions package.