Mohammad Komaei
Mohammad Komaei

Reputation: 9656

Why Visual Studio 2022 don't go to breakpoint (.razor file) in blazor wasm or hosted client project?

Hello I have blazor web assembly hosted project in .net 8 preview 6. Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.7.0 Preview 5.0 When I add a breack point in Dashboard.razor.cs component cs file that break point is empty circle with a yellow icon on it with this tooltip : "The breakpoint will not currently be hit. No Symbols have been loaded for this document" And after run the project by F5 the breakpoint not work.

Upvotes: 0

Views: 354

Answers (1)

Mohammad Komaei
Mohammad Komaei

Reputation: 9656

I figured out :

  1. I set port 7000 instead of 5000 or 6000 to “applicationUrl”: “https://localhost:7000” in Server>Properties>launchSettings.json
  2. “launchBrowser”: true,
  3. Only click on browser that vs open go to both Client and Server breakpoint and other browsers only go to Server breakpoint.

{
  "profiles": {
    "https": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
      "applicationUrl": "https://localhost:7000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

Upvotes: 0

Related Questions