# WithBrowserDebugger

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

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
func (JavaScriptAppResource) 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()`.

## Applies to

- [`BunAppResource`](/reference/api/go/aspire.hosting.javascript/bunappresource.md)
- [`DenoAppResource`](/reference/api/go/aspire.hosting.javascript/denoappresource.md)
- [`JavaScriptAppResource`](/reference/api/go/aspire.hosting.javascript/javascriptappresource.md)
- [`NextJsAppResource`](/reference/api/go/aspire.hosting.javascript/nextjsappresource.md)
- [`NodeAppResource`](/reference/api/go/aspire.hosting.javascript/nodeappresource.md)
- [`ViteAppResource`](/reference/api/go/aspire.hosting.javascript/viteappresource.md)
