Cannot debug client side blazor

A problem like this is also described on the documentation page for blazor debugging.

Although the example used is for the OnInitialized method, I found that it also works for other methods when the debugger doesn't seem to be triggered.

Just add Thread.Sleep(10000) or await Task.Delay(10000) at the start of your method and try again.


Looks like a repair install of visual studio solved the problem. I noticed that Visaul Studio code had no issues and, when debugging, it always launched a new browser window.
Visaul Studio was always launching a new tab on my existing browser windows.

After repair, visual studio started launching a new browser window. Not sure if that means anything to anyone.