Visual Studio 2013 detaches very often from process when MVC 5 - asp.net-mvc

I have an MVC 5 app running in Visual Studio 2014 Update 4.
My app is running fine in VS2013. But very often (about 4 out of 5 times) the debugger suddenly detaches from the process.
While the website keeps running, I don't get (of course) any debug information / breakpoints anymore.
Does someone have a solution or a way to troubleshoot this?

Related

IIS Express gets stuck and css styles sometimes not being applied when debugging an ASP.NET MVC application from Visual Studio 2013

I am debugging an ASP.NET MVC app from Visual Studio 2013. When I start the debug process from Visual Studio, IIS Express where app is hosted gets stuck (my app is not started). It often happens to me. In this situation, I manually stop IIS Express from the tray icon. Even stopping IIS Express from the tray icon I often need to stop manually the debugging from Visual Studio through the stop button. Once debugging is stopped, If I try to debug again it does not work, well, sometimes works and sometimes not, it is random. I have verified that if I clear all browser history and cookies, it works in most cases except for some time. Also I have observed that Visual Studio 2013 takes a long time to boot IIS Express where my ASP.NET MVC app is hosted. Finally, I have observed that my ASP.NET MVC app hosted in IIS Express sometimes is not being displayed correctly when debugging from Visual Studio, I mean, it is displayed without css styles being applied, it seems like css styles are missed. In this case, if I stop debugging and start it again it works.
So How can I improve or solve these kind of weird issues?
IIS Express gets stuck and css styles sometimes not being applied when
debugging an ASP.NET MVC application from Visual Studio 2013
This is a quite strange issue and l suggest you could try these suggestions
Suggestion
1) delete all caches under C:\Users\Administrator\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache, C:\Users\Administrator\AppData\Local\Temp and C:\Users\Administrator\AppData\Local\Microsoft\WebsiteCache.
2) close VS Instance, delete .vs hidden folder,bin,obj folder under the physcial path of the solution and then reopen your project
3) If you have IntelliTrace, please disable Enable IntelliTrace under Tools-->Options-->IntelliTrace-->General.
4) try another port like 56000 by right-clicking on the project-->Properties-->Web--> project url.
5) disable any third party extensions by Tools-->Extensions and Updates or just use devenv /safemode in developer command prompt for vs2013.
6) try to reinstall IIS on the control panel and if your IIS is not 10.0, I suggest you could download and use it.
In addition, VS2013 is too old and Microsoft does not continue to maintain it. So l suggest you could download and use the latest VS2019. It has more optimization and stronger performance than the previous VS and fixes some remaining issues from previous releases.

How can I prevent Visual Studio (2019) from opening "VS Debug Console" and just use the old .NET Core Host console?

It seems like with VS 2019 (Enterprise?), there is a new type of console application host available that even stays unclosed after I stop debugging. When starting multiple projects, the first console application that starts up will be of this new type.
I am searching for a way to prevent VS to use this console for the "main"-project, and simply use the same console for every project I am starting. I have started the same solution with 4 ASP.NET Core projects inside VS 2017 and Visual Studio did not start any console with 'dotnet.exe' in the title. So for is seems like this is a new thing in 2019.
The reason for this question is because I am having some trouble with this new console. The project often does not start at all and the colors of the console are all green. But that shouldn't be topic of this question.
So is there a way to prevent Visual Studio 2019 from starting this new console?
There's a setting under Tools->Options->Debugging->Automatically close the console when debugging stops that will restore the old behavior.

Windows 8 & ASP.NET MVC & IISExpress low performance on start

We have a pretty big ASP.NET MVC project with a lot of Areas, controllers etc. Everything was fine until I installed the project on my laptop - Windows 8.1, Intel Core i5, 12 GB RAM, 7200 HDD. The project starting time (F5) become extremely slow. I'm waiting for 3-5 minutes until the home page appears in the browser. First I thought that the problem is in my laptop, and I rent a VPS - Windows Server 2012, Intel Xeon 4 core, 14GB Ram, SSD. But the situation is the same - I'm waiting for a while before the first page appears.
What I've tryed:
batch="false" in Web.config (compile optimization was also disabled/enabled)
Disabled Resharper
Disabled IntelliTrace
Disabled MiniProfiler for EF
Disabled Firewall
No anti-virus software
Enabled the concurrent build in the Resharper's God Mode
The RAM disk was also used
dotTrace profiler shows that over 70% of execution time takes the unmanaged code
Debugging symbols caching
The problem has already appeared on PCs of a couple of my collegues. Situation is the same - Windows 8.1, pretty powerful hardware - impossible to work with Visual Studio. Please, if anybody knows where the problem is let us know.
P.S. We use Visual Studio 2013 Update 4, ASP.NET MVC 5, EntityFramework 6.
This works fine for me: Start a 2nd instance of VisualStudio with a minimal Webapp in IIS Express in debug mode and let it still run while working with your 1st Instance VS and do your work!

Debugger Unexpectedly Detaches

I have an ASP.Net MVC project that I have been working on for many months without incident. Since yesterday, the VS 2012 debugger consistently detaches from the project after it has been running for 2-3 minutes. So far, I cannot find any specific event that might trigger the detach.
I have not recently updated VS 2012 or any 3rd party libraries.
I can attach to the project again using Debug / Attach to Process. I have not observed the debugger detaching again after manually re-attaching.
When running a different, console program in the debugger I do not observe the same behavior.
How can I troubleshoot this issue?

Why does my VS2008 debugging session always quit on me when stepping through ASP.NET MVC controllers?

I'm running Visual Studio 2008 Professional SP1 on Windows 7 Ultimate x64 RTM. I'm using the ASP.NET MVC that you get from the Web Platform Installer.
When I step through my program and pause on any line for longer than a few seconds the debugger suddenly stops and the following message is printed in the Debug Output:
The program '[4232] WebDev.WebServer.EXE: Managed' has exited with code 0 (0x0).
It does not happen 100% of the time, but it's often enough to be extremely frustrating. This behavior happened in the W7 RC releases as well but never under Windows XP Pro x86.
Hard to say what's going on, but if this were happening to me the first thing I would do is click on Debug-> Exceptions, and go make sure all the possible culprits are checked off under Managed Debug Assistants and Common Language Runtime Exceptions.
IIS has a ping timeout to the process that host your site. I think the default is 90 seconds.
While in IIS, right click on the application pool that is running your application and select "Advanced Settings...". Scroll down to "Ping Maximum Response Time" and change it to a greater value. On my development machine, I use 600 which is 10 minutes.

Resources