can't start visual studio profiler

2019-02-22 08:19发布

问题:

I have VS 2010 Ultimate. I have created empty win32 console solution and replaced it's cpp file with http://pastebin.com/EQJKJK6T I tried to perform CPU Sampling profiling. But for some reason I get the following messages

MessageBox:

Could not launch 'path to exe file'. Previous attempt to profile the application finished unsuccessfully. Please restart the application.

Output window:

Profiling started.
Warning VSP2355: Some Windows counters will not be collected.  Without this data, some performance rules may not fire.
Profiling process ID 4368 (test).
Process ID 4368 has exited.
Data written to e:\projects\test\test101224.vsp.
Profiling finished.
PRF0025: No data was collected. 
Profiling complete.

回答1:

I had this issue, yet bizarrely it only affected one Visual Studio solution. Using the profiler with another Visual Studio solution worked fine.

I tried:

  • disabling Symantec
  • uninstalling VMware Player (as mentioned above)

but neither worked.

In the end I amended the registry, setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysPlant\Start to 4 and rebooted, it then started working.