# WithDebugging

- Module: [Aspire.Hosting.Python](/reference/api/go/aspire.hosting.python.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`PythonAppResource`](/reference/api/go/aspire.hosting.python/pythonappresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Enables debugging support for the Python application.

## Remarks

This method adds the `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.

## Definition

```go
func (PythonAppResource) WithDebugging() PythonAppResource
```

## Returns

[`PythonAppResource`](/reference/api/go/aspire.hosting.python/pythonappresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`PythonAppResource`](/reference/api/go/aspire.hosting.python/pythonappresource.md)
- [`UvicornAppResource`](/reference/api/go/aspire.hosting.python/uvicornappresource.md)
