简体   繁体   English

尝试调试ASP.NET网站时,Visual Studio 2013 sp1挂起?

[英]Visual Studio 2013 sp1 hangs when trying to debug ASP.NET web site?

Recently, Visual Studio 2013 started hanging again when trying to debug/trace an ASP.NET web site. 最近,在尝试调试/跟踪ASP.NET网站时,Visual Studio 2013再次开始挂起。 The site was created with WebMatrix 3 but I don't think that is relevant. 该网站是使用WebMatrix 3创建的,但我认为这不相关。

VS2013 opens the web site Solution. VS2013打开网站解决方案。 It takes a really long time to load up. 加载需要很长时间。 Once it does load up and I run the project, it hits my first breakpoint and then the IDE Window quickly shows "(not responding)" in the title bar and the IDE is now hung. 一旦它加载并运行项目,它就会到达我的第一个断点,然后IDE窗口会在标题栏中快速显示“(没有响应)”,IDE现在已挂起。

This happened to me a long time ago and the root cause was needing to set the "use 64-bit IIS" option as indicated by this SO post: 很久以前发生在我身上,根本原因是需要设置“使用64位IIS”选项,如此SO帖子所示:

Visual Studio 2013 crashes and restarts every time I run my test solution 每次运行测试解决方案时,Visual Studio 2013都会崩溃并重新启动

But I triple-checked and I do have the 64-bit option checked. 但我三重检查,我确实检查了64位选项。 What can I do to fix this? 我该怎么做才能解决这个问题?

What worked for me was resetting visual studio . 对我有用的重置视觉工作室 I got the suggestion from http://www.vosseburcht.com/?p=69 我从http://www.vosseburcht.com/?p=69获得了建议

See this blog in the issue. 请参阅此博客中的问题。 It basiclly says to make sure "show all files" is selected in the solution and check for any folders that don't belong that are not part of your project/solution. 它基本上说要确保在解决方案中选择“显示所有文件”,并检查不属于您的项目/解决方案的任何文件夹。

The problem resurfaced again a few days later and I finally figured out the problem with my uncooperative debugger. 几天后问题再次出现,我终于找到了我的不合作调试器的问题。 I have a folder containing approximately 20,000 images that are not included in the Visual Studio web project but are sitting in a directory in the web site. 我有一个包含大约20,000个图像的文件夹,这些图像未包含在Visual Studio Web项目中,但位于网站的目录中。 I had turned on "Show All Files" in Solution Explorer to add some script files into the project. 我在解决方案资源管理器中打开了“显示所有文件”,将一些脚本文件添加到项目中。 When "Show All Files" is off, F5 (Start Debugging) works like champ. 当“显示所有文件”关闭时,F5(开始调试)就像champ一样。 When "Show All Files" is on, Visual Studio becomes unresponsive. 当“显示所有文件”打开时,Visual Studio变得无法响应。 In reality it is not "frozen" but simply taking a very long time to process those 20,000 image files. 实际上它并没有“冻结”,只是花了很长时间来处理这些20,000个图像文件。

For me, it was a folder created called backup , which was a backup of the site (created by VS). 对我来说,这是一个名为backup的文件夹,它是站点的备份(由VS创建)。 I deleted the folder in question and the site loaded for debugging. 我删除了有问题的文件夹和加载的站点进行调试。

It might be caused be some extensions in Visual Studio, I was facing a similar problem when degbugging asp.net websites. 它可能是Visual Studio中的一些扩展,我在使用asp.net网站时遇到了类似的问题。 Try running VS in Safemode: devenv.exe /Safemode . 尝试在Safemode中运行VS: devenv.exe /Safemode In my case it was caused by Multilingual App Toolkit extension, after uninstalling it, debugging ASP.NET websites works once again. 在我的情况下,它是由Multilingual App Toolkit扩展引起的,在卸载之后,调试ASP.NET网站再次工作。

In my case, I was able to solve it by running it as an Administrator! 在我的情况下,我能够通过以管理员身份运行来解决它! Don't know why, couple of days back it was working fine, suddenly it started to freeze when trying to debub web app! 不知道为什么,几天后它工作正常,突然它开始冻结试图debub网络应用程序! Hope it helps someone! 希望它可以帮到某人!

BTW: I am running VS2013 Ultimate, with Update 4 顺便说一句:我正在使用Update 4运行VS2013 Ultimate

In my case it's the IntelliTrace that causes problem. 在我的情况下,IntelliTrace会导致问题。 I need to disable it https://msdn.microsoft.com/en-us/library/dd264948(v=vs.100).aspx 我需要禁用它https://msdn.microsoft.com/en-us/library/dd264948(v=vs.100).aspx

我有相同的情况,并以一种非常特殊的方式“解决它”:重建解决方案并运行它而无需调试(Control + F5),然后返回并以正常方式调试它。

I was having a similar issue, and I found the following error in Windows Application Event Log that corresponded to the problem: 我有一个类似的问题,我在Windows应用程序事件日志中发现以下错误对应的问题:

Application: PowerShellToolsProcessHost.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.Serialization.InvalidDataContractException
...

So I removed PowerShell Tools for Visual Studio extension, and the issue went away. 所以我删除了用于Visual Studio扩展的PowerShell工具,问题就消失了。 I am using Visual Studio Ultimate 2013 Update 5. 我正在使用Visual Studio Ultimate 2013 Update 5。

I had this problem while writing an Excel add-in. 我在编写Excel加载项时遇到了这个问题。

Not being a web app I was pretty sure that checking the 64 bit IIS Express option would make no difference, but it did! 不是一个Web应用程序我很确定检查64位IIS Express选项没有任何区别,但确实如此!

I have no idea why, but it runs in debug ok now :) 我不明白为什么,但它现在运行在调试好了:)

我不得不安装Windows Management Framework 4.0

我的解决方案是在升级到新的DevExpress版本时删除DevExpress ProjectConverter生成的所有.bak备份文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM