切换到调试模式时 Visual Studio 冻结
奇怪的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果一切都工作正常然后停止,通常这意味着存在一些问题,即使它没有被注意到。
我会尝试一个又一个的事情:
devenv、mspdbsrv、vcpkgsrv、msbuild、msvsmon、vshub、vstest
等.suo、.ncb、.解决方案的 VC.db、.VC.VC.opendb
文件以及.vs
目录,有时会导致问题YourProjectName.vcproj。 DOMAINNAME.LOGINNAME.user
或YourProjectName.csproj.user
。设置文件名取决于您使用的项目类型"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 环境% 的用户设置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:
devenv, mspdbsrv, vcpkgsrv, msbuild, msvsmon, vshub, vstest
etc.suo, .ncb, .VC.db, .VC.VC.opendb
files of the solution as well as.vs
directory, which sometimes cause problemsYourProjectName.vcproj.DOMAINNAME.LOGINNAME.user
orYourProjectName.csproj.user
. The setting file name depends on a project kind you use"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%USERPROFILE%\AppData\[Local|Roaming]\Microsoft\VisualStudio[vs_version]
and in registryHKCU\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.
在 2017 年遇到了这个问题。我以管理员身份运行 VS 2017 并且它有效。
Had this problem in 2017. I ran VS 2017 as Administrator and it worked.
我在 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.
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.
就我的具体情况而言,我尝试了许多其他答案,但没有运气。事实证明,对此的调用挂起了调试器:
我通过在
[ 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:
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.