Skip to content

[Blazor] Enable debugging for Blazor WebAssembly apps launched from Aspire dashboard #64891

@javiercn

Description

@javiercn

Description

When launching a Blazor WebAssembly application through the .NET Aspire dashboard, there's currently no way to attach a debugger to the browser process. Unlike launching directly from Visual Studio or via dotnet run, the Aspire dashboard launches the app by opening a URL in the default browser without the necessary debugging flags.

Current Behavior

  • Aspire dashboard provides a clickable link that opens the app in the default browser
  • No debugging capabilities are available
  • Developers must manually restart the browser with remote debugging flags to debug

Expected Behavior

The Aspire dashboard should provide an option to:

  1. Launch the Blazor WebAssembly app with debugging enabled
  2. Automatically configure the browser with appropriate debugging flags (e.g., --remote-debugging-port=9222)
  3. Allow seamless debugging experience similar to F5 debugging in Visual Studio

Possible Solutions

  1. Add a "Debug" button next to the app URL in the dashboard that launches the browser with debugging enabled
  2. Provide launch settings integration that respects debugging configuration from launchSettings.json
  3. Automatic debugger attachment when the app is launched in debug mode via Aspire

Additional Context

This is particularly important for:

  • Developers working with Aspire-orchestrated applications
  • Teams debugging complex multi-project solutions
  • Testing debugging scenarios in containerized environments

Related Issues

  • Part of improving Aspire developer experience
  • Related to general Blazor WebAssembly debugging workflows

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor Components

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions