Skip to content

Debugger runs old ASP.NET Blazor (server) code first time. Have to debug twice to get code changes. #63444

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It’s more difficult to complete my work] [regression] [worked-in:.net 8]
I am increasingly having the issue where when I make changes to my ASP.NET Blazor based projects (built using ABP recently upgraded to 9.x) and press “Start Debug” in visual studio it almost always runs an old version of the code and does not catch break points. I see many other people have submitted similar issues but they all seem to time out. I have this happening on my two major projects. The issue is they are large projects and I’m guessing their increased size could be part of the issue. So I can’t really make a “demo” to demonstrate the issue (that I know of). If there is a way to share projects securely that might be possible but still difficult because of database dependencies etc.

Only after debugging sometimes several times does it catch the new code. As I said this is now happening on both of my new projects (possibly related to my .net 9 upgrade).

Thanks for any help you can provide!

Jonathan


Original Comments

Jonathan Brauer on 6/11/2025, 10:57 AM:

I did the following steps:

  • Unchecked “Enable Just My Code”
  • ran abp clean (to delete all bin and obj) folders
  • deleted .vs folder
  • and rebooted

and the problem STILL persists! I made a small change and ran it and no break points were reachable.

After trying again it ran the correct code but now won’t hot reload a simple change.

Jonathan Brauer on 6/11/2025, 00:27 PM:

Happened again on the other large project although it almost seemed that it just ignored all of the changes that were successfully made and shown via “hot reload” in the last debug session. Debugging again showed none of those changes at all. Stopping and starting resolves the issue (but the project is fairly big so takes awhile to build).

Jonathan Brauer on 6/11/2025, 01:59 PM:

Happened again. I very clearly changed a .cs file (DBContext definition), hit stop debug and then hit start debug. and it acted like I’d never made the change!
Hit stop again and start again, same issue.
Stop and start again, and finally it used the new dbcontext configuration.

THREE times before it worked!! :’(

Why am I seeing this?

Feedback Bot on 6/11/2025, 09:26 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Metadata

Metadata

Assignees

Labels

Author: Migration Bot 🤖The issue was created by a issue mover bot. The author may not be the actual author.area-blazorIncludes: Blazor, Razor Componentsfeature-hot-reloadThis issue is related to the Hot Reload feaature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions