Visual studio 2019 freezes when debugging

Visual studio 2019 freezes when debugging

Please try the following steps:

1) disable any third party extensions under Extensions–>Manage Extensions in case some other extensions cause this abnormal behavior.

2) close VS, delete bin and obj folder and then restart your project. If you project uses packages.config to manage nuget packages, please run update-package -reinstall under Tools–>NuGet Package Manager–>Package Manager Console to prevent nuget package references from getting confused and causing debug blocking.

Thenrebuild your project and then debug it to test.

3) run devenv /safemode on Developer Command Prompt for VS2019 to start a pure VS and then debug your project to test again.

4) If it does not work, you could create a new winform project in VS2019 and then migrate the old content into the new one to test whether the issue still persists. And if it succeeded, it is a better solution to avoid this issue.

Besides, if step 4 still not work, I think the issue is related to your code. When you debug your project, you could open Debugging–>Windows–>Threadd to check which process is blocking. And you should check your code carefully.

In addition, you could also share your sample with us here so that we can troubleshoot the issue more quickly.

Leave a Comment