vscode: Debug mode for Blazor WASM applications freezes on startup and stop doesn´t stop the debug process

Does this issue occur when all extensions are disabled?: Yes - Tested on insiders build

  • VS Code Version: 1.64/1.65.0
  • OS Version: Windows 11 22000.493

Steps to Reproduce:

  1. Turn on debug mode for Blazor WASM application
  2. See chrome freeze and unable to stop debug mode

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 24 (4 by maintainers)

Most upvoted comments

I’m hitting the same issue.

.NET SDK v6.0.102 (and 3.1.416 installed, not used) VSCode Info:

Version: 1.64.2 (system setup)
Commit: f80445acd5a3dadef24aa209168452a3d97cc326
Date: 2022-02-09T22:02:28.252Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19044

extensions:

  • ms-dotnettools.blazorwasm-companion v1.1.0
  • ms-dotnettools.csharp v1.24.0

Launching the debug session opens a browser on a blank page (both chrome and edge) and stays that way - not hanged, just idle; I can close it. However, VSCode doesn’t react to Stop Debug or Restart Debug commands.

I can launch the project with dotnet run just fine from the terminal, though.

Any updates on this? I’m facing the same issue during Blazor dabugging. VS Code doesn’t respond to clicking on Stop button after debug starts.

I am also seeing a similar issue. However, I’m not experiencing a browser freeze. When I launch and debug a .NET 6 blazorwasm project in VS Code, the browser opens an “about:blank” window (I can close this window), but nothing happens when I try to click the Stop/Disconnect button in VS Code (the debugger seems to be frozen). Here’s how I reproduce the issue:

  1. Create a new blazorwasm project (I ran mkdir test-blazor then cd test-blazor, then dotnet new blazorwasm)
  2. Open the new blazorwasm project in VS Code and add the launch configurations:
  3. Start debugging from VS Code
  4. Attempt to stop debugging from VS Code

Here are my launch.json and tasks.json: launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch and Debug Standalone Blazor WebAssembly App",
            "type": "blazorwasm",
            "request": "launch",
            "cwd": "${workspaceFolder}"
        }
    ]
}

tasks.json

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                "${workspaceFolder}/test-blazor.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "publish",
            "command": "dotnet",
            "type": "process",
            "args": [
                "publish",
                "${workspaceFolder}/test-blazor.csproj",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile"
        },
        {
            "label": "watch",
            "command": "dotnet",
            "type": "process",
            "args": [
                "watch",
                "run",
                "--project",
                "${workspaceFolder}/test-blazor.csproj"
            ],
            "problemMatcher": "$msCompile"
        }
    ]
}

I’m seeing a similar thing. I’m able to close Edge, but the debugger doesn’t seem to respond to the stop command. I tested this on two different Windows computers with the same result. I was also able to test it on a Mac, which works as expected. All three systems have their settings and extensions synced as well, so the environments should be as similar as two platforms could be.

vscode-debugadapter-660bbcfd.json.gz .

That’s crazy - or I’m crazy.

  1. I had runtimes: 3.1.29, 5.0.17, 6.0.9 and 7.0.0.-rc1, and SDKs v6.0.401 and 7 RC1 (windows 10 pc).
  2. I’ve uninstalled runtime v3.1 - still hangs
  3. I’ve uninstalled runtime v5.0 - problem fixed

I still have absolutely no idea how on Earth having old runtimes on the device hangs Blazor WASM debugging on newer SDKs and runtimes (app targets net6.0, global.json forces SDK v6.0.400).