10

When trying to debug my Blazor wasm app in Visual Studio Community 2022, after I hit a breakpoint and check what I want to check and then Step Out, the app starts to stop several times with the following message:

Frame not in module

The current stack frame was not found in a loaded module. Source cannot be shown for this location.

enter image description here

It seems like it's trying to step into the wasm files by looking at the locals when these stops happens: enter image description here I still can Step Out and continue but have to do it several times which is time consuming.

I have tried enabling "show disassembly if source is not available" to no avail. I also have tried deleting the obj and .vs folders and restarting VS.

enter image description here

HZamani
  • 105
  • 7
  • https://stackoverflow.com/questions/47933932/visual-studio-2017-debug-error-frame-not-in-module – K Scandrett Jan 01 '23 at 05:38
  • Didn't help as I already have the CLR exceptions ticked and the platform is set to Any CPU. Although there are tons of CLR exceptions under the CLR exception settings, I'm not sure if there's any specific one I need to check/uncheck. – HZamani Jan 01 '23 at 09:05
  • 2
    This just started happening to me too, in the last week or so. None of the suggested solutions seem to work. – WearySky Jan 01 '23 at 20:31
  • 1
    I have the same issue, but strangely, about 10% of the time everything works fine and the breakpoints are hit. – Patrick Thorpe May 29 '23 at 08:31
  • I'm still having the issue. Have updated my VS to the latest, which they suggest it's going to fix it on MS forums, but it didn't do. – HZamani Jun 02 '23 at 04:25
  • Having this issue as well. It started last week after I updated VS 2022. – jeffkenn Jun 14 '23 at 18:22

1 Answers1

0

Sometimes I can get this to work if I

  1. clean the solution (for some reason with newer releases of VS 2022, it has a tendency to cache the build artifacts by default, which is annoying)
  2. Then run my Blazor app in debug mode
  3. When the browser opens, open Dev Tools, go to Network tab, click the checkbox for Disable Cache, and refresh the page to ensure it's grabbing the latest build of the Blazor app