The diagnostic tools in Visual Studio 2019 Community have stopped working. It shows it's recording the CPU profile but whenever I pause the program to see the results, the tools say "There is no data in the current set of filters."
It was working at one point, and as far as I'm aware, I didn't change anything. And if I go into the Filter drop down menu it shows everything except "Hide native code" is selected.
How can I fix this?
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.
To disable the Diagnostic Tools, start a debugging session, select Tools > Options > Debugging > General, and then deselect the Enable Diagnostic Tools while debugging option.
If you spot a potential issue when debugging, you can get a per-function breakdown of CPU Usage by running the CPU Usage tool without the debugger. To do this go to Debug -> Start Diagnostic Tools without Debugging, select CPU Usage, and click Start.
A recent Windows update has apparently added a second problem to the original NVIDIA Display adapter issue.
See this ticket in Microsoft Developer Community: No Data in CPU Usage Tool, Windows Update related
Recently a Windows Update broke the CPU Usage tool in Visual Studio where no data is collected. After analyzing the tool will report, “There is no data in the current set of filters”. This is due to a bug in the Windows ETW subsystem such that profiling events are not emitted, we are working with the Windows ETW team to root cause the issue and create a fix. As this affects ETW, the underlying system which creates the profiling data, this will affect any ETW profiler: Visual Studio, PerfView, WPA, XPerf, etc.
This is also discussed in the Microsoft Developer Community link in Andrey's answer, profiling CPU still states no user code was running. Scroll down to Mar 17, 2021.
It seems that there is now another underlying root cause besides the original NVIDIA one which is breaking ETW profiling system wide. This means any ETW profiler (Visual Studio, WPA, PerfView, etc) will be affected since all of them rely on the same ETW system. Unfortunately the EnableTraceEx2 system call returns success and we end up with no profiling data in the resulting trace which is making debugging difficult. I’m engaging with the Windows team that owns the ETW subsystem and will most likely need additional diagnostics once we figure out what our next steps are. In the meantime if anyone has paid product support licenses feel free to engage with that as well, hopefully working together we can uncover the root cause. Once I get more information from the ETW team I’ll report back, until then stay tuned.
Hi folks, just wanted to let everyone know that we have engaged with the Windows ETW team on this and they are investigating. It seems like a recent Windows Update may have caused this issue and they are working with an internal customer in Xbox who has a repro. When I have more info on the cause, workaround, and fix I will let everyone know. In the mean time stay tuned.
I've found an answer here. For now, the only solution seems to be disabling NVIDIA Display Adapter in Device Manager and reboot.
In my case the other sampling profilers, e.g. AMD μProf didn't work well either with that driver.
I have been having this issue for months and no fixes have worked but using the Visual Studio Installer I ran repair on the IDE and now profiling works properly.
Edit: This didn't permanently fix the issue. But going to "Virus and threat-detection settings" and disabling "Real-time detection" allows it to collect data now too.
Edit2: My first appears to be the root cause for this and there is a MSFT solution here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With