Skip to content

Frame not in module when hitting a breakpoint in Blazor WASM #86754

Closed

Description

@joseangelmt

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After upgrading to Visual Studio 17.6.0 and 17.6.1 the debugger shows me a Source Not Available page with the body:

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

The curious thing is that in the .razor file the breakpoints selected before executing the application are kept without warnings, but if I add one while the application is running, it appears with the warning: "The breakpoint will not currently be hit. Unbound breakpoint".

When I open the debug window "Modules" I can check that the module "Application.server.dll" has the status "Symbols loaded" and that the "symbol file" is correct.

I have tried deleting the .obj and .bin directories, I have tried with .net 6 and .net 7 (with their corresponding updated NuGet packages), I have tried with different browsers, and in all of them, the error is the same.

When debugging no error appears in the Output window.

The curious thing is that if I create a new application with the wizard, there is no problem and Visual Studio stops at the line in the .razor file. I have analyzed both projects and I do not see what could be the cause of my main project causing this problem.

Expected Behavior

  • That Visual Studio allows me to add breakpoints without displaying the error "The breakpoint will not currently be hit. Unbound breakpoint".
  • Visual Studio stops at the correct line in the .razor file once it hits the breakpoint.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

7.0.302

Anything else?

  • ASP.NET Core version: 6.0.16 or 7.0.5
  • Visual Studio 17.6.1
.NET SDK:
 Version:   7.0.302
 Commit:    990cf98a27

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\7.0.302\

Host:
  Version:      7.0.5
  Architecture: x64
  Commit:       8042d61b17

.NET SDKs installed:
  3.1.426 [C:\Program Files\dotnet\sdk]
  5.0.408 [C:\Program Files\dotnet\sdk]
  6.0.311 [C:\Program Files\dotnet\sdk]
  7.0.302 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Activity

  1. transferred this issue fromdotnet/aspnetcoreon May 25, 2023
  2. ghost added
    needs-area-label
    on May 25, 2023
  3. ghost added
    untriaged
    on May 25, 2023
  4. javiercn commented on May 25, 2023

    @javiercn
    Member

    @thaystg can you take a look?

    /cc: @lewing

  5. thaystg commented on May 25, 2023

    @thaystg
    Member

    @joseangelmt I need more help to reproduce/understand what may be happening.
    First, can you share the code?
    Second, can you share the file: C:\Users[USER_NAME]\AppData\Local\Temp\visualstudio-js-debugger.txt
    Third, can you share the nuget packages that you are using and the versions in your projects?

    Thanks

  6. added this to the 8.0.0 milestone on May 25, 2023
  7. ghost removed
    untriaged
    on May 25, 2023
  8. added
    untriaged
    and removed
    untriaged
    needs-area-label
    on May 25, 2023
  9. added
    arch-wasm
    on May 25, 2023
  10. added
    os-browser
    on May 25, 2023
  11. 30 remaining items

  12. ghost removed
    in-pr
    on Jun 19, 2023
  13. LongJohnBlackbeard commented on Jun 20, 2023

    @LongJohnBlackbeard

    I currently have the same issue.
    @EricCornelson dist.zip file replacement makes debugging breakpoints on my Web Assembly Client project work again. Can this thread be updated when it is fixed in a new release?

  14. candritzky commented on Jun 25, 2023

    @candritzky

    @EricCornelson I had the same problem with VS2022 17.6.4 and can confirm that your dist.zip fixed it.

  15. Swepps commented on Jun 26, 2023

    @Swepps

    @candritzky Just updated to 17.6.4 and used dist.zip as described by EricCornelson and it appears to fix the issue.

  16. buzzluck68 commented on Jun 29, 2023

    @buzzluck68

    I also used dist.zip and while it did fix the debugging breakpoints within C# code files, it caused VS to stop responding for my breakpoint on C# code within a razor file. VS had a popup indicating it was looking for the razor breakpoint, or something to that affect (I already killed that instance of VS to stop it).

  17. EricCornelson commented on Jul 5, 2023

    @EricCornelson

    @EricCornelson Thank you, will try it, could you please tell us ETA of next release?

    Should be around mid-July

  18. SimonJWales commented on Jul 8, 2023

    @SimonJWales

    dist.zip seems to work for me too on VS 17.6.4

  19. phantomkingx commented on Jul 23, 2023

    @phantomkingx

    Issue still on VS 17.6.5, fixed with dist.zip

  20. AchilleasTyrnenopoulos commented on Jul 24, 2023

    @AchilleasTyrnenopoulos

    Also had same issue in VS 17.6.5 and was solved with the dist.zip

  21. benjamin-Keller commented on Jul 25, 2023

    @benjamin-Keller

    Still an issue VS 17.6.5, dist.zip solved it

  22. 1KimHansen commented on Jul 26, 2023

    @1KimHansen

    I still have the issue in VS 17.6.5, and "dist.zip" did not solve it

  23. badhitman commented on Aug 1, 2023

    @badhitman

    У нас есть исправление для этого, которое также появится на стороне отладчика, которое должно быть в следующем выпуске, но в то же время, если вы хотите, чтобы все сразу заработало, вы можете заменить файлы в C:\Program Files {Ваш VS установите dir}\Common7\IDE\CommonExtensions\Microsoft\JSDiagnostics\Debugger\DebugAdapter с файлами в dist.zip . Это должно дать вам исправление сразу (используйте на свой страх и риск, поскольку это не официальный способ обновления отладчика, хотя он должен работать).

    Thanks a lot. this solution helped. VS 17.6.5
    there was no end to my suffering and finally the guy fixed the problem that microsoft can't solve.

  24. sgreifeneder commented on Aug 2, 2023

    @sgreifeneder

    same here on VS 17.6.5 ... dist.zip fixed the issue

  25. badhitman commented on Aug 2, 2023

    @badhitman

    The strangest thing is that the problem is only in one old Blazor project. It used to be ok everywhere, but at some point one project fell into such a problem. The project file is the most common and even trivial. The solution file is also unremarkable. Rolling back to a previous version of VS doesn't help. All Blazor projects except one are fine. It's been a problem for quite some time now.

    Eric is a real doctor! My pain is gone - thank you Eric!

  26. ghost locked as resolved and limited conversation to collaborators on Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-wasmarea-Debugger-monoos-browser

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions