user8447050 user8447050 - 1 month ago 9
C# Question

How best to diagnose an issue when debugging C# application results in VisualStudio stalling

I am working in VisualStudio 2010 SP1 on an application server system written in C#. (Yes this is a legacy application.) The system is a large multi-threaded server application that provides a large SOAP API along with newer REST APIs for other portions of the system.

For a long time I have noticed that occasionally when starting the system in debug mode both the server and VisualStudio would stall. Neither UI would respond and calls to the server APIs would block. This situation could be recovered from only by halting the server using Task Manager, after which VisualStudio would complain with an error.

Recently this problem became persistent, that is it happens every time. The lock up occurs at various times, that is I have not been able to identify a specific time when the system locks up, it may (often) happen as soon as the server is started, other times it may take a minute or so, but always shortly after startup, both VisualStudio and the server lock up.

If I try to do something in the VisualStudio UI, e.g. pressing the Pause button, I will get the "Microsoft Visual Studio Delay Notification" icon in the notifications section of the Windows task bar.

I have done some investigation on the web and have tried the following unsuccessfully:

  • Clean rebuild

  • Removing all build products from the directory structure

  • Doing a clean checkout in a new directory structure

  • resetiis

  • Removing the .suo files

  • Resetting the VisualStudio settings

I have also tried creating both mini & full dumps of both the application and devenv, but I have not been able to understand them well enough to find any issue.

What would you do to try to identify the issue?

Answer Source

The solution to my issue turned out to be working on the program using VS2015. This is not a wonderful solution since we still build in VS2010, but it at least allowed me to proceed. We are not sure exactly what caused the issue.