# JavaScriptAppResource.WithBrowserDebugger

- Module: [Aspire.Hosting.JavaScript](/reference/api/go/aspire.hosting.javascript.md)
- Defined on: [JavaScriptAppResource](/reference/api/go/aspire.hosting.javascript/javascriptappresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures a browser debugger for the JavaScript application resource, enabling browser-based debugging through a child resource that launches when the parent application is ready.

## Remarks

This method creates a child `BrowserDebuggerResource` that waits for the parent JavaScript
application to start, then launches a browser debug session targeting the parent's HTTP or HTTPS endpoint.
The parent resource must have at least one HTTP or HTTPS endpoint configured.

## Definition

```go
type JavaScriptAppResource interface {
    // ... omitted for brevity
    WithBrowserDebugger(options ...*WithBrowserDebuggerOptions) JavaScriptAppResource
}
```

## Signature

```go
WithBrowserDebugger(options ...*WithBrowserDebuggerOptions) JavaScriptAppResource
```

## Parameters

- `options` (`...*WithBrowserDebuggerOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithBrowserDebuggerOptions` argument.

- `Browser` (`*string`) -- The browser to use for debugging. Defaults to `"msedge"`. Supported values include `"msedge"` and `"chrome"`.

## Returns

[`JavaScriptAppResource`](/reference/api/go/aspire.hosting.javascript/javascriptappresource.md) -- The resource builder.

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

## Defined on

- [JavaScriptAppResource](/reference/api/go/aspire.hosting.javascript/javascriptappresource.md) -- `handle`
