Skip to content

Blazor WebAssembly doesn't load symbols for debugging #38413

@JansthcirlU

Description

@JansthcirlU

Describe the bug

A newly created blazorwasm project inside of an empty folder with automatically created launch.json (I've added the option to launch edge in there) and tasks.json cannot be debugged on Ubuntu 20.04 because the symbols do not get loaded. I keep getting the "Additional setup is required to debug Blazor WebAssembly applications." notification but I have no idea what I'm doing wrong.

To Reproduce

  1. Create a new folder called MyBlazorApp somewhere
  2. Navigate inside the folder and Open in Terminal
  3. Type dotnet new blazorwasm
  4. Type code .; exit
  5. Allow VS Code to auto-generate launch.json and tasks.json
  6. Inside launch.json, add "browser": "edge" to the first configuration in the list
  7. Go to the file Counter.razor inside of the Pages folder and put a breakpoint where it says currentCount++;
  8. Press F5 to debug
  9. Ctrl + click on one of the local addresses to debug the Blazor app
  10. Go to the counter page and press the button
  11. Nothing happens

Exceptions (if any)

I have tried the above steps a couple times in different folders, but it never debugs properly.

Further technical details

  • ASP.NET Core version: 6.0.0
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version: VS Code 1.62.2
  • Operating System: Ubuntu 20.04
  • C# for Visual Studio Code version: v1.23.16
  • Browser: Microsoft Edge (dev) 96.0.1043.1-1 (edge_stable-stable-main)
  • Include the output of dotnet --info:
dotnet --info Output
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.100/

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  5.0.402 [/usr/share/dotnet/sdk]
  6.0.100 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.11 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.11 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
launch.json Contents
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch and Debug Standalone Blazor WebAssembly App",
            "type": "blazorwasm",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "browser": "edge"
        }
    ]
}
tasks.json Contents
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                "${workspaceFolder}/MyBlazorApp.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "publish",
            "command": "dotnet",
            "type": "process",
            "args": [
                "publish",
                "${workspaceFolder}/MyBlazorApp.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "watch",
            "command": "dotnet",
            "type": "process",
            "args": [
                "watch",
                "run",
                "${workspaceFolder}/MyBlazorApp.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        }
    ]
}
launchSettings.json Contents
{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:55666",
      "sslPort": 44381
    }
  },
  "profiles": {
    "MyBlazorApp": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
      "applicationUrl": "https://localhost:7072;http://localhost:5032",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExternalThis is an issue in a component not contained in this repository. It is open for tracking purposes.Priority:2Work that is important, but not critical for the releasearea-blazorIncludes: Blazor, Razor Componentsfeature-blazor-debuggingThis issue is related to debugging of Blazor WebAssembly appsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyfeature-razor.vscodeinvestigate

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions