Reputation: 45
I am struggling with this issue that does not let me debug properly for a while and it has been impossible to find information online about it.
The problem is that when I am running my application with the debugger, besides the fact that its performance is way worse than without it, when I am looking at the timeline of the diagnostics tools I can see that it doesn't match with the time that the application has been running. I think that it is better understood with an example:
Why is that difference in time? I am working with a C# .NET application with multiple threads.
Upvotes: 0
Views: 309
Reputation: 591
Disclaimer: I work on Visual Studio, specifically the Diagnostic Tools.
It is pretty common to see that the application time shown by the Diagnostic Tools does not match what the perceived application time is. This is due to the fact that the debugger is doing things inside your process, and we don't want that to be shown in the capture trace. To work around this, we basically get timestamps of when the debugger starts doing work in the process and when it stops. We then subtract this time out, which is the actual application process time in terms of user code, and show this in the swimlane graphs. My guess is that your app / debugging setup is doing something which requires a lot of debugger intervention.
A simple example of this is a console app which throws and catches exceptions in a loop (see below). You can run this app in the debugger without even stopping and it will seem like it is barely crawling along as the debugger is doing work inside your process during each throw.
namespace ConsoleApp2 {
using System;
class Program {
static void Main(string[] args) {
while (true) {
try {
throw new Exception();
} catch (Exception) { }
}
}
}
}
Upvotes: 2
Reputation: 6436
The diagnostics tools would collect many data information like CPU usage/Memory or others, it really would impact the VS performance more or less.
Actually I also reported an issue to the product team, Nik shared a path about why it has so massive I/O. Even if it was not the same issue as yours, but at least, we could know that the diagnostics tools really was busy to collect much more information:)
Visual Studio 2015 StandardCollector.Service.exe runaway I/O.
If you want to debug your app without collect the diagnostics information, you could disable this tool under TOOLS->Options->Debugging.
Of course, if you have good suggestion for it, you could also submit a request here.
Upvotes: 1