19

I have Visual Studio 2015 Community Edition Update 3 running on Windows 7 SP1 64 bit, which I use to develop C# applications.

I love the diagnostic tools during debugging to spot performance problems early on. However, they stopped working for me sometime in the last month or so (possibly related to installing Update 3, although I have no information to back that up). I see the error message "CPU Profiling while debugging is not available on this version of Windows. To see CPU usage details, run the CPU Usage tool without the debugger (Debug -> Performance Profiler...)."

Things I have tried without success:

  • Completely uninstalling and reinstalling VS.

  • Performing a repair on my VS installation

  • Ensuring "Use {Managed,Native} compatability mode" is disabled in debug options.

  • Enabling the Diagnostics Hub logging info as described in this question. No error messages that I can see appear in the logs.

This still happens even if I create a new WPF project, so I don't believe it has any project-specific cause.

Are there any other things I can try? Obviously they were working before, so I don't believe the error message about my version of Windows being unsupported.

2
  • In Tools>Options>Intellitrace, is the Enable intellitrace checked?
    – Frode
    Sep 3, 2016 at 15:15
  • Also, Tools>Options>Debugging>General>Enable Diagnostic Tools while debugging
    – Frode
    Sep 3, 2016 at 15:17

9 Answers 9

33

Deleting my solution's .suo (solution options) file fixed the issue. My initial statement of this bug affecting even new projects seems to be wrong. Although, I did do a complete reinstall of VS after doing that test, so it's possible that impacted the outcome.

4
  • Thank you. That fixed it for me.
    – jHilscher
    Oct 31, 2016 at 13:09
  • Thanks, it had nothing to do with IntelliSense (or the Registry or Win7/10) because VS Professional was working fine (on Win10) and one day, I had noticed it stopped working. This did the trick! Just curious, are there references on MSDN that you may have found that lead to just deleting the .suo file or was it just an act of desperation to delete it grin?
    – HidekiAI
    Nov 9, 2016 at 23:21
  • This answer worked wonderfully for me - running VS 2015 Community Update 3 on Windows 10 Pro. Jan 25, 2017 at 1:42
  • 5
    The .suo file might be hidden in the .vs directory Jan 30, 2017 at 22:42
18

Full disclosure: I work at Microsoft, specifically on the Diagnostic Tools team.

There are parts of the Diagnostic Tools that won't work on Windows 7, specifically taking a CPU profiling trace while debugging. This is a limitation of the operating system and ETW. If you are just interested in the graphs and debugging events, those should work. You can turn on logging for our tools which might give you some insight into why they are not working:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogLevel  
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\DiagnosticsHub\LogDirectory

For LogLevel you can use one of the following strings "All", "Info", "Debug", "Warning", "Error" (In your case I would use All to better see what is happening). As for LogDirectory it is a directory of your choice "C:\Logs". When your done reproing the scenario, close VS to flush the logs and don't forget to delete these keys as the diagnostic tools logging is pretty system intensive.

You should be able to search for "Error ---" in the logs to get an idea of what is happening. We have seen problems with certain VS extensions and custom projects.

Also, feel free to also post the issue at: https://connect.microsoft.com/ Each issue that is received there gets turned into a bug and assigned to the corresponding team.

6
  • There are no Error or Warning entries in the log. I do see a message that says: "Debug --- Scripted Control (CpuView.manifest.json) --- Message received from agent: {"command":"isSupportedAgent","isSupported":false}"
    – tdenniston
    Sep 8, 2016 at 11:17
  • Yes, that corresponds to our check of whether or not CPU profiling while debugging is enabled for the OS. In your case since you are on Win 7 it is not supported. The graphs and memory tool should still work though.
    – Nik
    Sep 8, 2016 at 23:30
  • It's so easy to accidentally click the close button when you meant the pin button as they are so tiny and close together in VS. Could you put the buttons a lot further apart? May 16, 2017 at 5:30
  • The Original Poster indicated that the diagnostic tools worked in a previous version. What happened (e.g. architecture change) to cause it to no longer work?
    – CJBS
    Sep 15, 2017 at 19:00
  • The CPU tool has never worked during debugging in Windows 7 due to a limitation in ETW, we are limited to a single profiling session. In order to work while debugging we need multiple sessions, as we need to spin a second one up and shut down our first one each time you want to look at data to get the results. If we don't have overlap in the sessions we can and probably would miss events, making analysis impossible. We still allow you to use the "Performance Profiler" option which is the traditional collect a single trace and analyze.
    – Nik
    Sep 27, 2017 at 19:23
4

I had som issues with that a while ago.

1) Check Tools>Options>Debugging>General>Enable Diagnostic Tools while debugging

2) Check Tools>Options>Intellitrace>Enable intellitrace

4
  • 2
    Enable diagnostics tools while debugging is checked. I don't seem to have an Intellitrace option--is that available in Community Edition?
    – tdenniston
    Sep 3, 2016 at 15:45
  • No, sorry. Probably an Enterprise feature
    – Frode
    Sep 4, 2016 at 21:23
  • 1
    Thanks. In VS 2015 SP3, enabling the Diagnostic Tools made stepping in debugging faster. Disabling the Diagnostic Tools makes stepping in debug mode incredibly slow.
    – Hace
    Jan 6, 2017 at 11:25
  • If that checkbox is UNCHECKED, Visual Studio alerts you with a message: "The Diagnostic Tools window is disabled in Tools -> Options -> Debugging."
    – Jazimov
    Nov 3, 2018 at 19:32
4

I had the same issue, although deleting the .suo file did not help, I also repaired Visual Studio 2015 Professional and then it worked. So for future readers, if deleting the .suo does not help, try to also repair Visual Studio and vice versa.

3

None of the others worked for me. What I had to do was close all Visual Studios and re-opened it and the diagnostic tool worked.

(I deleted the .suo file, made sure all the correct options were enabled, but because I had another Visual Studios session running, none of it worked until I closed all)

1
  • While closing and restarting Visual Studio 2015 Enterprise worked, I also had deleted the .suo file in my solution folder prior to restarting the IDE.
    – Jazimov
    Feb 16, 2017 at 3:04
2

I had already another visual studio instance running with diagnostic one. That was the issue for me.

1

I faced this problem today and it was not easy to find working solution. This helped to me: Reinstall Cumulative Servicing Release for Microsoft Visual Studio 2015 Update 3 (KB3165756) Direct link to download: http://go.microsoft.com/fwlink/?linkid=816878. After Repair action (I had it installed before, otherwise install) prompted to restart computer, did it and Diagnostic tools worked again.

0

I had a similar problem with Visual Studio 2015 Pro Update 3 running on Windows 10 Home. The runtime display of memory and cpu usage stopped working. Deleting the .suo file fixed the problem, as indicated by proc-self-map's answer. The .suo file was buried in the .vs hidden directory so I removed the whole .vs subdirectory. Now the runtime display of memory and cpu usage works like a charm again. No reinstall required.

2
  • 1
    It's a really bad idea to just delete a directory just because it contains a file that you want to delete--and even irresponsible to suggest to others to follow your lead and delete an entire folder, the contents of which you clearly don't fully understand. The .vs folder typically contains a config folder with .config files containing hundreds of settings, some of which may have been customized for the solution in question. As I commented above, ONLY the .suo file need be deleted. And instead of deleting it, I recommend renaming it and later deleting it if the rename solved the problem.
    – Jazimov
    Feb 16, 2017 at 17:22
  • Deleting the suo file does not fix the problem for me. I have one solution where the diagnostic tools work and another one where they don't. So it is not the install and I restarted VisualStudio several times.
    – Okkenator
    May 24, 2019 at 16:53
0

What solved the problem for me was reinstalling the Cumulative Servicing Release for Microsoft Visual Studio 2015 Update 3 (KB3165756) 1. If you have it installed before just select Repair.

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 2, 2023 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.