I cannot get the Blazor WebAssembly debugging to work when using Docker Compose orchestration in Visual Studio 2022
The reproduction is quite simple:
- Create a sample app using the
Blazor Web Apptemplate
dotnet new blazor --interactivity WebAssembly
Open the solution in Visual Studio, locate the
Counter.razorcomponent, and add a breakpoint to theIncrementCount()methodAdd Docker Compose support (
Add->Container orchestration supportand selectDocker Compose)Run the debug session and select the
docker-composeas the startup projectNavigate to
/counterURL and click on the button
Result: Breakpoint is active, but never hit by the debugger
Is there any solution for this or workaround?
Note: When running locally in Kestrel, everything works as expected.
Environment:
Visual Studio 17.14.0
.NET version 9.0.300
Windows 11 (24H2)
Docker Desktop 4.41.2