# withDelveServer

- Module: [Aspire.Hosting.Go](/reference/api/typescript/aspire.hosting.go.md)
- Version: `13.4.0-preview.1.26281.18`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Starts a headless Delve debug server so that any DAP-compatible client can attach remotely. The application is launched as `dlv --headless=true --listen=127.0.0.1:<port> --api-version=2 debug .` instead of `go run .`. Delve must be available on the PATH.

## Definition

```typescript
interface GoAppResource {
  // ... omitted for brevity
  withDelveServer(port?: number): GoAppResource
}
```

## Parameters

- `port` (`number`) `optional` `= 2345`

## Returns

[GoAppResource](/reference/api/typescript/aspire.hosting.go/goappresource.md) `builder`

## Applies to

- [GoAppResource](/reference/api/typescript/aspire.hosting.go/goappresource.md)
