Share via


ResourceBuilderExtensions.WithVSCodeDebugSupport<T> Method

Definition

Adds support for debugging the resource in VS Code when running in an extension host.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithVSCodeDebugSupport<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string projectPath, string debugAdapterId, string? requiredExtensionId, Action<Aspire.Hosting.ApplicationModel.CommandLineArgsCallbackContext>? argsCallback = default) where T : Aspire.Hosting.ApplicationModel.IResource;
static member WithVSCodeDebugSupport : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> * string * string * string * Action<Aspire.Hosting.ApplicationModel.CommandLineArgsCallbackContext> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResource)
<Extension()>
Public Function WithVSCodeDebugSupport(Of T As IResource) (builder As IResourceBuilder(Of T), projectPath As String, debugAdapterId As String, requiredExtensionId As String, Optional argsCallback As Action(Of CommandLineArgsCallbackContext) = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

Parameters

builder
IResourceBuilder<T>

The resource builder.

projectPath
String

The path to the project file.

debugAdapterId
String

The debug adapter ID to use. Ie, coreclr

requiredExtensionId
String

The ID of the required VS Code extension. If specified, the extension must be installed for debugging to be enabled.

argsCallback
Action<CommandLineArgsCallbackContext>

Optional callback to add or modify command line arguments when running in an extension host. Useful if the entrypoint is usually provided as an argument to the resource executable.

Returns

Applies to