Using Blazor debug a Script window appears after breakpoint stepped over

Viewed 115

I have created a Blazor Web Assembly project. I selected 'ASP.NET Hosted' and 'PWA' options. Without any modifications I run the Blazor app. I set a breakpoint in the Counter component. The breakpoint is reached and successfully stepped over. However, once I press debug button, the button in VS is highlight and I am presented with a new window inside VS of a file called 'localhost:44314/_framework/wasm/dotnet.3.2.0.js[dynamic]'. This file starts with the following text:-

"var Module=typeof Module!=="undefined"?Module:{};var moduleOverrides={}....."

and continues with:-

"// SIG // Begin signature block // SIG // MIIjhwYJKoZIhvcNAQcCoIIjeDCCI3QCAQExDzANBglg // SIG // hkgBZQMEAgEFADB3BgorBgEEAYI3AgEEoGkwZzAyBgor // SIG // BgEEAYI3AgEeMCQCAQEEEBDgyQbOONQRoqMAEEvTUJAC......// SIG // End signature block"

I am using:-

VS2019: Version 16.7.0 Preview 6.0 (most recent I believe)

Chrome: Version 84.0.4147.105 (Official Build) (64-bit)

.NET Core SDK: Version: 3.1.400-preview-015203

Win 10: OS Version: 10.0.18363

N.B. identical behaviour when browsing with EDGE: Version 84.0.522.52 (Official build) (64-bit)

Any ideas why this is happening and how to stop it?

Thanks in advance

2 Answers

This started to happen for me now in VS 2022 preview. The following workaround helped me:

Open the following window: Debug -> Windows -> Exception settings

Then, in the "Break when thrown" list, untick Javascript Exceptions and Javascript Runtime Exceptions

Today I updated to VS2019 Preview 16.8 which has just become available and I am in debug heaven - no more oddities ;-)

Related