visual-studiochromiumblazor-webassembly.net-8.0

Visual Studio 2022 breaking on exceptions in third-party JavaScript library files when debugging Blazor WASM app using Chrome


I just switched to a new development machine with a fresh install of Visual Studio. When I debug my Blazor WASM app, Visual Studio / Chrome keeps breaking on exceptions in "[dynamic]" JavaScript files loaded in the page from third party libraries (e.g. Stripe checkout JS, Google Maps JS, or even some exceptions seemingly thrown from the blazor framework JS). I then have to spam the Continue button 10+ times in Visual Studio until it eventually lets me continue execution.

example of exception break in minified library script

I have searched fruitlessly for a solution. I have tried:

Unfortunately, none of these has worked. Any assistance to save me a lot of furious clicking would be highly appreciated!

I am running Visual Studio Community 2022 17.11.4, and my Blazor app is .NET 8.


Solution

  • This started happening for me too after the 17.11 update. Blazor would stop on unhandled exceptions in MSAL javascript library that was internal to Microsoft's nuget stack that it never stopped at before (it seems it was always failing in the background, but the failure was expected and annoying to keep skipping over by hitting the continue button in visual studio).

    I resolved it by turning this off after the update to 17.11 of Visual Studio 2022:

    1. Go to Debug > Windows > Exception Settings
    2. Unmark Javascript Exceptions > Uncaught Exceptions

    Exception Settings window

    Update: This was also reported here and similar resolution steps detailed: https://developercommunity.visualstudio.com/t/Version-17110---MSAL-Exception-Unhandl/10727217