Visual Studio 2013 sp1 hangs when trying to debug ASP.NET web site?
Asked Answered
L

10

11

Recently, Visual Studio 2013 started hanging again when trying to debug/trace an ASP.NET web site. The site was created with WebMatrix 3 but I don't think that is relevant.

VS2013 opens the web site Solution. 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.

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:

Visual Studio 2013 crashes and restarts every time I run my test solution

But I triple-checked and I do have the 64-bit option checked. What can I do to fix this?

Locoism answered 4/3, 2014 at 14:32 Comment(2)
Are you using express or a full Visual Studio? If you are using full are you able to do ctrl-F5 to run the project and then attach using Tools -> Attach to Process?Sat
@NigelEllis Ctrl-F5 works. Then I attach to iisexpress.exe. That works. But as soon as I set a breakpoint and reload the web page in the browser, it hangs again. It's definitely something to do with breakpoints and tracing.Locoism
G
6

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. 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. When "Show All Files" is on, Visual Studio becomes unresponsive. In reality it is not "frozen" but simply taking a very long time to process those 20,000 image files.

For me, it was a folder created called backup, which was a backup of the site (created by VS). I deleted the folder in question and the site loaded for debugging.

Goldfilled answered 5/5, 2014 at 18:27 Comment(4)
I'm having same issue in a winforms app. Unfortunately, this did not solve this problem.Mutate
I also found that I had an API that was doing a lot (I mean a lot) of caching, which was causing the hang. How big is your application? Also check if you are running out of memory. I had to increase my memory to 8gb from 4gb. VS is a hog while debugging.Goldfilled
Memory wasn't an issue in my case. I have 12GB. I ran across this link that suggested resetting visual studio. That worked for me. vosseburcht.com/?p=69Mutate
I had the same issue, cleaning up the Temp folder solved it .. thanks !!Inclination
M
8

What worked for me was resetting visual studio. I got the suggestion from http://www.vosseburcht.com/?p=69

Mutate answered 13/5, 2014 at 16:2 Comment(1)
This was the solution for me, as well. I have no clue what changed in VS because this magically started occurring one morning. Specifically, I'd start a debug session and for every 4-5 seconds of inspecting code, the application would hang for 2-3. Resetting the settings fixed something, but God only knows what?Befuddle
G
6

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. 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. When "Show All Files" is on, Visual Studio becomes unresponsive. In reality it is not "frozen" but simply taking a very long time to process those 20,000 image files.

For me, it was a folder created called backup, which was a backup of the site (created by VS). I deleted the folder in question and the site loaded for debugging.

Goldfilled answered 5/5, 2014 at 18:27 Comment(4)
I'm having same issue in a winforms app. Unfortunately, this did not solve this problem.Mutate
I also found that I had an API that was doing a lot (I mean a lot) of caching, which was causing the hang. How big is your application? Also check if you are running out of memory. I had to increase my memory to 8gb from 4gb. VS is a hog while debugging.Goldfilled
Memory wasn't an issue in my case. I have 12GB. I ran across this link that suggested resetting visual studio. That worked for me. vosseburcht.com/?p=69Mutate
I had the same issue, cleaning up the Temp folder solved it .. thanks !!Inclination
J
2

It might be caused be some extensions in Visual Studio, I was facing a similar problem when degbugging asp.net websites. Try running VS in Safemode: devenv.exe /Safemode. In my case it was caused by Multilingual App Toolkit extension, after uninstalling it, debugging ASP.NET websites works once again.

Jael answered 23/9, 2014 at 9:14 Comment(0)
E
2

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! Hope it helps someone!

BTW: I am running VS2013 Ultimate, with Update 4

Edgardoedge answered 27/1, 2015 at 13:9 Comment(1)
Looks like this solved my problem as well. Thanks for the tip!Amidst
O
2

In my case it's the IntelliTrace that causes problem. I need to disable it https://msdn.microsoft.com/en-us/library/dd264948(v=vs.100).aspx

Octad answered 12/8, 2015 at 6:36 Comment(0)
S
1

I have the same situation and "solved it" in a very particular way: Rebuild the solution and run it without debugging (Control + F5), then go back and debug it the normal way.

Sulemasulf answered 14/11, 2014 at 15:44 Comment(0)
S
1

I was having a similar issue, and I found the following error in Windows Application Event Log that corresponded to the problem:

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. I am using Visual Studio Ultimate 2013 Update 5.

Suitable answered 26/5, 2016 at 20:20 Comment(0)
O
0

I had this problem while writing an Excel add-in.

Not being a web app I was pretty sure that checking the 64 bit IIS Express option would make no difference, but it did!

I have no idea why, but it runs in debug ok now :)

Octane answered 27/11, 2014 at 10:28 Comment(0)
I
0

I had to install Windows Management Framework 4.0

Intermediary answered 29/5, 2016 at 0:18 Comment(0)
G
0

My solution was to remove all the .bak backup files generated by DevExpress ProjectConverter when I had upgraded to the new DevExpress version.

Grieve answered 26/9, 2016 at 17:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.