question

ibocon avatar image
0 Votes"
ibocon asked wavemaster answered

Debug a standalone Blazor WebAssembly app in VSCode with 'watch'

I want to debug standalone Blazor WebAssembly applicaton with watch options in VSCode.

I followed Debug ASP.NET Core Blazor WebAssembly and it works well with breakpoint. However code change does not apply while debugging. But, Run dotnet wtach run --project /Path/To/Project.csproj in Terminal does apply code change. So I suspect launch.json file should be changed to apply watch option.

What should I change to achieve it?

Here is my launch.json, which is auto-generated.

json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Ledger.Client.Web",
            "type": "blazorwasm",
            "request": "launch",
            "cwd": "${workspaceFolder}/Client/Web",
        }
    ]
}


dotnet-aspnet-core-blazor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

wavemaster avatar image
0 Votes"
wavemaster answered

You will need VS2019 16.11.2 with Net6 preview 5 or VS2020 preview 1, which has the Net6 preview 5.

Hot reload didn't work in Net6 preview 4 or Net5.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.