切换到调试模式时 Visual Studio 冻结

发布于 2024-08-13 16:19:54 字数 167 浏览 7 评论 0原文

奇怪的 Visual Studio (TS 2008) 问题:每当我在特定项目中从发布模式切换到调试模式时,IDE 就会完全冻结。它发生在我切换时,在我尝试构建或做任何其他事情之前。

整个事情开始得很突然,没有任何我能想到的异常变化。 我尝试清洁溶液,但没有帮助。

以前有人遇到过这个吗?

Strange Visual Studio (TS 2008) problem: The IDE completely freezes whenever I switch from Release to Debug mode in a specific project. It happens right as I switch, before I try to build or do anything else.

The whole thing started out of the blue, without any abnormal change I can think of.
I tried to clean the solution, but it didn't help.

Anyone ran into this before?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

静谧幽蓝 2024-08-20 16:19:54

如果一切都工作正常然后停止,通常这意味着存在一些问题,即使它没有被注意到。

我会尝试一个又一个的事情:

  1. 检查从源代码控制引擎更新后哪些文件被更改(原因和方式)
  2. 查看扩展和插件列表。尝试禁用全部或部分它们
  3. 关闭 Visual Studio 并终止所有开发进程:devenv、mspdbsrv、vcpkgsrv、msbuild、msvsmon、vshub、vstest
  4. 删除 .suo、.ncb、.解决方案的 VC.db、.VC.VC.opendb 文件以及 .vs 目录,有时会导致问题
  5. 删除项目设置文件,例如 YourProjectName.vcproj。 DOMAINNAME.LOGINNAME.userYourProjectName.csproj.user。设置文件名取决于您使用的项目类型
  6. Run "C:\Program Files\Microsoft Visual Studio [vs_version]\Common7\IDE\devenv.exe" /setup"C: \Program Files (x86)\Microsoft Visual Studio [vs_version]\Common7\IDE\devenv.exe" /setup 对于 x64 环境
  7. 在某些复杂的情况下,它有助于删除位于 home % 的用户设置USERPROFILE%\AppData\[Local|Roaming]\Microsoft\VisualStudio[vs_version] 和注册表 HKCU\SOFTWARE\Microsoft\VisualStudio[vs_version]

它应该将所有内容重置为开始状态。如果它不起作用,那么还有其他工具可以进行调查。下载 Process Explorer,一旦 IDE 冻结,启动 Process Explorer,找到 devenv 进程,双击它并转到“线程”选项卡。检查哪个线程在冻结时具有最大的切换增量,双击它并获取顶部函数的名称(或偏移量)。它提供了可能出现问题的附加信息。

此外,有时它有助于在控制面板的“添加或删除程序”向导中修复 Visual Studio。

If everything has worked fine and then stopped, usually it means there was some problem even though it had passed unnoticed.

Things I would try one after another:

  1. Check which files were changed (why and how) after update from a source control engine
  2. Review the list of extensions and plugins. Try to disable all or some of them
  3. Close Visual Studio and kill all the development processes: devenv, mspdbsrv, vcpkgsrv, msbuild, msvsmon, vshub, vstest etc
  4. Remove .suo, .ncb, .VC.db, .VC.VC.opendb files of the solution as well as .vs directory, which sometimes cause problems
  5. Remove project setting files, sort of YourProjectName.vcproj.DOMAINNAME.LOGINNAME.user or YourProjectName.csproj.user. The setting file name depends on a project kind you use
  6. Run "C:\Program Files\Microsoft Visual Studio [vs_version]\Common7\IDE\devenv.exe" /setup or "C:\Program Files (x86)\Microsoft Visual Studio [vs_version]\Common7\IDE\devenv.exe" /setup for x64 environment
  7. In some complex cases, it helps to remove user settings, located in home %USERPROFILE%\AppData\[Local|Roaming]\Microsoft\VisualStudio[vs_version] and in registry HKCU\SOFTWARE\Microsoft\VisualStudio[vs_version]

It should reset all things to the beginning state. If it won't work, so there are additional tools to investigate. Download Process Explorer and once IDE freezes, start the Process Explorer, find the devenv process, double-click on it and go to Threads tab. Check, which thread has the biggest switch delta in case of the freeze, double-click on it and take the name (or offset) of the top function. It gives additional info where the problem may be.

Moreover, sometimes it helps to repair Visual Studio in the "Add or Remove Programs" wizard in Control Panel.

半﹌身腐败 2024-08-20 16:19:54

在 2017 年遇到了这个问题。我以管理员身份运行 VS 2017 并且它有效。

Had this problem in 2017. I ran VS 2017 as Administrator and it worked.

弄潮 2024-08-20 16:19:54

我在 VS 2017 (15.8) 中遇到过这个问题。升级到最新版本(当时为15.9)解决了该问题。

I've encountered this in VS 2017 (15.8). Upgrade to the newest version (15.9 at that time) resolved the issue.

甜宝宝 2024-08-20 16:19:54

VS 似乎在幕后做了很多工作,并将项目特定的文件放在 App Data 中,谁知道还有什么地方。我有这样的经历:我有一个项目,在两个不同的目录中有两组相同的代码:一组用于生产,一组用于开发。开发项目开始处于调试状态,但生产却没有。尝试了各种设置并删除 .suo 文件,但没有帮助。因此,我重命名了开发版本所在的目录,然后一切就都顺利进行了。

VS seems to be doing a lot behind the scenes and putting project-specific files in App Data and who knows where else. I had this experience: I had a project which had two sets of identical code in two different directories: one for production, one for development. The development project started hanging on debug, the production did not. Tried all kind of settings and deleting .suo files, but no help. So I renamed the directory that the development version was in and presto, eveything worked without hanging.

喜爱皱眉﹌ 2024-08-20 16:19:54

就我的具体情况而言,我尝试了许多其他答案,但没有运气。事实证明,对此的调用挂起了调试器:

Log4NetExtensions.AssertFail("Error");

我通过在 [ Debug > > 下调出线程窗口,设法将其范围缩小到这行代码。窗口> Threads] 并单击当前线程以浏览到它所挂起的代码行。

In my particular case, I tried many other answers with no luck. It turned out that a call to this was hanging the debugger:

Log4NetExtensions.AssertFail("Error");

I managed to narrow it down to this line of code by bring up the threads window under [ Debug > Windows > Threads ] and clicking on the current thread to browse to the line of code it was hanging on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文