dotnet / dotnet/aspnetcore

[area-blazor] When debugging the Blazor WebAssembly project, the breakpoint in Counter.razor file can't be hit

Open
#67,507 20 comments 0 reactions 2 assignees Claimed by @kotlarmilos View on GitHub
area-blazor investigate
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

**Regression info**: Works well with .NET11 Preview 5 and previous P6

**Install Steps**
1. Clean machine: Win11 x64 ENU 25H2
2. Install VS Code Stable 1.126.0
3. Install .Net 11.0 preview 6 SDK from https://release.dot.net/
4. Add feed

**Repro Steps**
1. Open a normal Command Prompt (do not run as administrator).
2. Create a Blazor Web App - WebAssembly project and open it with vs code
```
dotnet new blazor -int WebAssembly -o BlazorWASM
cd BlazorWASM
code .
```
1. Open the `BlazorWASM.Client/Pages/Counter.razor` file, place a breakpoint at method @code{} (line 17)
1. Navigate to the explorer, right click the *.csproj file > debug > Start New Instance
1. After the project opens in the browser, click the "Click me" button in Counter page.

**Note:**
1. This issue also repro on Blazor WebAssembly Standalone project.
2. This does not repro with Blazor Web App - Server/Auto project
1. This does not repro on .NET 10/9 projects
1. This issue also repro when debugging with VS 18.9 Insider.

**Actual:**

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.