次の方法で共有


PythonAppResourceBuilderExtensions.WithDebugging<T> Method

Definition

Enables debugging support for the Python application.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithDebugging<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder) where T : Aspire.Hosting.Python.PythonAppResource;
static member WithDebugging : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.Python.PythonAppResource)> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.Python.PythonAppResource)> (requires 'T :> Aspire.Hosting.Python.PythonAppResource)
<Extension()>
Public Function WithDebugging(Of T As PythonAppResource) (builder As IResourceBuilder(Of T)) As IResourceBuilder(Of T)

Type Parameters

T

Parameters

builder
IResourceBuilder<T>

The resource builder.

Returns

A reference to the IResourceBuilder<T> for method chaining.

Remarks

This method adds the Aspire.Hosting.Python.PythonExecutableDebuggableAnnotation to the resource, which enables debugging support. The debugging configuration is automatically set up based on the entrypoint type (Script, Module, or Executable).

The debug configuration includes the Python interpreter path from the virtual environment, the program or module to debug, and appropriate launch settings.

Applies to