CodexBloom - Programming Q&A Platform

Visual Studio 2022 - implementing Debugging Asynchronous Methods in Blazor WebAssembly

πŸ‘€ Views: 74 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-13
blazor visual-studio debugging C#

I'm getting frustrated with I'm prototyping a solution and I'm wondering if anyone has experience with I'm trying to implement I'm working on a personal project and I've been struggling with this for a few days now and could really use some help....... I'm working with a frustrating scenario while debugging asynchronous methods in my Blazor WebAssembly application using Visual Studio 2022. When I set breakpoints in async methods, the debugger doesn’t hit the breakpoints, and instead, I see the message 'The breakpoint will not currently be hit. No symbols have been loaded for this document.' I’ve ensured that my project is set to Debug configuration, yet it still occurs. The relevant part of my code looks like this: ```csharp @code { private async Task LoadDataAsync() { var data = await Http.GetJsonAsync<DataType>("api/data"); // Breakpoint set here myData = data; } } ``` I've tried cleaning the solution and rebuilding it, and I also made sure that 'Enable Just My Code' is unchecked in the Debugging options. Additionally, I've verified that the necessary NuGet packages for Blazor WebAssembly are up to date. However, the question continues. Is there something specific I might be missing when it comes to debugging asynchronous calls in a Blazor WebAssembly context? Any insights would be greatly appreciated! My development environment is Windows. What's the best practice here? I'd really appreciate any guidance on this. For reference, this is a production microservice. Has anyone else encountered this? What am I doing wrong? For context: I'm using C# on Ubuntu 20.04. I'm open to any suggestions.