Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is VS 2015 stopping diagnostics session is taking forever?

Tags:

I am trying to analyze a WPF project (WPF, .NET 4.6.1, EF 6, Moq., on a i5 machine with W10 64 bit) using the performance profiler with only "Timeline" activated.

Problem is that on stopping the program I am stuck in the "Report.....diagsession" tab with the message "Microsoft Visual Studio is stopping your diagnostics session" and the rotating hourglass. Some times it just times out, other times I get to the report eventually, but 5 to 20 minutes later.

Interestingly the time waiting for the diagnostic session to stop is included in the report. It is like the process collecting the data does not get the message to stop recording.

Using Windows Resource Monitor I have noticed VsStandardCollector.exe writing huge amounts of data to a subfolder in "C:\Users\XXX\AppData\Local\Temp\". About 9 Gigabyte in my last try, covering 10 minutes in total while my application only ran for 30 seconds before I stopped it.

Anyone with an idea what could cause the delay in stopping the session?

CPU and disk use is very low during waiting (< 5%)

like image 766
Daniel Hillebrand Avatar asked Mar 20 '17 15:03

Daniel Hillebrand


People also ask

How do I turn off diagnostic tool in Visual Studio?

To disable the Diagnostic Tools, start a debugging session, select Tools > Options > Debugging > General, and then deselect the Enable Diagnostic Tools while debugging option.

How to use Diagnostic tools in Visual Studio 2022?

When you start debugging in Visual Studio by selecting Debug > Start Debugging, or pressing F5, the Diagnostic Tools window appears by default. To open it manually, select Debug > Windows > Show Diagnostic Tools. The Diagnostic Tools window shows information about events, process memory, and CPU usage.


1 Answers

Recently I've learnt about PerfView tool that is used for performance analysis even inside of Microsoft. It's much cheaper than VisualStudio, in fact it is free.

So you may use it to analyze performance of Visual Studio to answer your question or even better - use it to analyze performance of your own WPF application.

like image 142
Puterdo Borato Avatar answered Oct 16 '22 18:10

Puterdo Borato