问题
I'm having some problems getting the Diagnostic Tools in Visual Studio 2015 (with Update 3) to start. I build and launch a project in Debug Mode, the Diagnostic Tools window pops up with the text
Starting Diagnostic Tools...
and after around ten minutes this text disappears but the Diagnostic Tools window remains (with nothing on it). There is no output in the Diagnostics Hub, either. This happens on both x86 and x64 platforms, running VS as administrator doesn't help either.
VShub.exe an the Visual Studio Standard Collector Service are both running.
EDIT: It now fails sooner and the Diagnostic Tools window gives thhe following message:
The diagnostic tools failed unexpectedly. The Diagnostics Hub output in the Output window may contain additional information.
And now the Diagnostics Hub window has the following message:
VsHub failed to locate/start service.
回答1:
This is an environmental problem, software that is running on the machine is interfering with the proper operation of VSHub.exe. Underlying issue is that it operates a lot like malware does, attaching itself to another process (the program you are trying to debug) and then using a named pipe to talk to another process (the IDE). The "failed to locate/start service" is the diagnostic message for not being able to connect the named pipe.
This behavior is enough to raise the hackles or trigger a bug in the kind of software that tries to stop malware from doing this. Products like Avast, AVG, Sophos, ESET, McAfee have been identified before for being especially unfriendly on a developer's machine. Avast in particular needs to be singled-out as a product that has never stopped causing trouble.
The test is simple, just de-activate the product and check that the delay is now gone. You might limp along by adding specific exclusions for vshub.exe and devenv.exe, but choosing a product more compatible with what a programmer does every day is wise. I've seen, and personally experienced, very few problems with the antimalware solution included with Windows.
来源:https://stackoverflow.com/questions/39235059/cant-get-visual-studio-diagnostic-tools-to-work