I try do debug a blazor webassembly app, that references a shared project named Test.Shared. I've been trying to set breakpoints in that projects code but nothing helped - breakpoints just aren't hit.
When I'm trying to set a breakpoint outside in the calling code and then step into "Test.Shared" source - it just seems to go step by step through the underlying code (I have to hit "step forward" multiple times before it proceeds the debugging to the next line, and the number of hits changes when I reduce/increase the number of lines in the underlying method code) but its not displayed in the debugger window.
So, after some investigation, I figured out that I can make the debugger work when I throw away all the code from the Test.Shared and leave only one simple test static method. Based on this fact I guess there is some specific type of C# code that causes the whole containing library to be invalid for debugging. Any suggestions what this code type might be?
The environment I use:
- Visual Studio Enterprise 2019 16.6.2
- NET Standard 2.1 as a target platform for both Blazor app and shared library
- NET Core 3.1 as a target platform for the hosting web app that serves webassembly app packages
- Microsoft.Components.WebAssembly 3.2.0