Can't get Visual Studio Diagnostic Tools to work

拥有回忆 提交于 2019-12-08 16:54:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!