WithBrowserLogs
Method
func (ResourceWithEndpoints) WithBrowserLogs(options ...*WithBrowserLogsOptions) ResourceWithEndpointsSignature
method
WithBrowserLogs builderAdds a child resource that can open the application's primary browser endpoint in a tracked browser session, surface browser diagnostics, and capture screenshots.
WithBrowserLogs(options ...*WithBrowserLogsOptions) ResourceWithEndpointsParameters
options...*WithBrowserLogsOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithBrowserLogsOptions argument.
Browser*stringThe browser to launch. When not specified, the tracked browser uses the configured value from Aspire:Hosting:BrowserLogs and otherwise prefers an installed "msedge" browser in shared user data mode, an installed "chrome" browser in isolated user data mode, and finally falls back to "chrome". Supported values include logical browser names such as "msedge" and "chrome", or an explicit browser executable path.Profile*stringOptional Chromium profile name or directory name to use. Only valid when the effective user data mode is Shared. When not specified, the tracked browser uses the configured value from Aspire:Hosting:BrowserLogs if present.UserDataMode *BrowserUserDataMode Optional BrowserUserDataMode that selects whether the tracked browser launches against a persistent Aspire-managed user data directory shared across all AppHosts on the machine (Shared, the default) or a per-AppHost persistent user data directory (Isolated). Both modes use Aspire-managed paths under %LocalAppData%\Aspire\BrowserData on Windows (or platform equivalents); the user's normal browser profile is never used. When not specified, the tracked browser uses the configured value from Aspire:Hosting:BrowserLogs and otherwise defaults to Shared.Returns
ResourceWithEndpoints The resource builder.
Returns a handle; failures surface later via Err().
Applies to
This method applies to the following types:
type
CSharpAppResourcetype
ContainerResourcetype
DotnetToolResourcetype
ExecutableResourcetype
ProjectResource