Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS 2022 Hot Reload with debugger #23864

Closed
guardrex opened this issue Nov 11, 2021 · 7 comments · Fixed by #25638
Closed

VS 2022 Hot Reload with debugger #23864

guardrex opened this issue Nov 11, 2021 · 7 comments · Fixed by #25638

Comments

@guardrex
Copy link
Collaborator

guardrex commented Nov 11, 2021

When VS 2022 can do it, remove the following remark ...

In Visual Studio 2022 GA (17.0), Hot Reload is only supported when running without the debugger.

I'm going to track this one on the Blazor.Docs project so that I don't lose it 😄.

UPDATE 12/28

Checked with VS release 17.0.4, and Hot Reload is working, including with the debugger and with code changes in a component of a Blazor Server app with the debugger running. However, it seems to be working when the file is saved in the IDE with the Hot Reload on File Save option in use. That's the approach that DR demoed in the Standup. AFAICT, physically reloading the page in the browser per dotnet/aspnetcore#38809 (comment) is NOT required. The topic here currently doesn't mention saving the file specifically to trigger the automatic browser reload, so we might add a bit more guidance when we remove the NOTE about running with the debugger. I'll check with Tanay when we get back from the 💃🕺 holidays 🎆🥳 for the latest info.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@guardrex guardrex self-assigned this Nov 11, 2021
@dotnet-bot dotnet-bot added ⌚ Not Triaged Source - Docs.ms Docs Customer feedback via GitHub Issue labels Nov 11, 2021
@guardrex guardrex removed Source - Docs.ms Docs Customer feedback via GitHub Issue ⌚ Not Triaged labels Nov 11, 2021
@ldsenow
Copy link

ldsenow commented Jan 7, 2022

My personal experience is to use dotnet watch cli for hot reload is much better than vs' at the moment.

@guardrex
Copy link
Collaborator Author

guardrex commented Jan 7, 2022

I'll be checking in with the product unit within a few weeks on the latest status. Everyone just returned from the holidays, and they're still digging out of mountains of email ⛏️⛰️📧😅.

@vchirikov
Copy link

My personal experience is to use dotnet watch cli for hot reload is much better than vs' at the moment.

I can't attach to a process runned with dotnet watch with vs code (vsdbg)

Error:

Failed to attach to process: Attaching a .NET debugger to this process is not allowed because code changes have been applied. The process must be restarted to allow debugging.

After dotnet watch restarted the process (like after touch src/Project.csproj) I can attach, but debugger completely unusable (hit a breakpoint, but continue doesn't work).

Where I should create an issue? (MIEngine or ???) Or debugging with vsdbg shouldn't work at all with dotnet watch?

@guardrex
Copy link
Collaborator Author

guardrex commented Jan 10, 2022

Before opening an issue, search the open ones. I haven't reached this yet to discuss it with any of the PU members or management, but I do see a bunch of open, actively discussed PU issues. Read these and see if they match your situation with Hot Reload and debugging ...

https://github.com/dotnet/aspnetcore/issues?q=is%3Aissue+is%3Aopen+label%3Aarea-blazor+hot+reload

@guardrex
Copy link
Collaborator Author

Here's what I think we should do at this point. I checked the engineering repo, and I see several Hot Reload issues under investigation and WIP. I can't say if the NOTE should be removed and/or additional remarks about what works and what doesn't should be added. I'm going to move this back to a P2 issue with the "PU" label and ask them to look at this issue and advise further. They'll be reviewing these issues within a few weeks.

@guardrex
Copy link
Collaborator Author

UPDATE (4/15): Whatever was wrong seems to be fixed. Local testing is 👍 and 🎉 for Hot Reload with the debugger. Removing the remark now.

@Engincode
Copy link

Engincode commented Aug 25, 2022

I found the solution.
http://www.engincode.com/-solved-visual-studio-2022-hot-reload-not-working-xamarin-forms-xaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants