简体   繁体   中英

Attach to process with VS2010 for CPU profiling

When profiling an attached process with Visual Studio 2010, I can only get a memory profiling report, no CPU profiling data. I triple-checked that the collection method is "Sampling" and that "Collect .NET object allocation information" is unchecked.

I basically got the same problem as this fellow , but the answer did not solve my problem.

I think something was wrong with the configuration of the environment variables for profiling.

Executing

VSPerfCLREnv /sampleon

via command line did the trick. Afterwards profiling the CPU worked with the command line tools as well as in Visual Studio.

More details on how to use the profiler from the command line can be found here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM