Profiling in VS 2012

I am using Win 8 x64 and setting up Visual Studio Ultimate 2012

I am running a C # project

and want to run profiling for my project

when i start profiling it gives me

'Profiling started.

Profiling process ID 848 (testing).

'848' is not a valid process identifier.

Profiler interruption.

PRF0025: No data was collected.

Profiling completed.

I'm new to profiling

I have Google for this problem, and just found some talking about the problem with WIN 8 http://social.msdn.microsoft.com/Forums/en-US/vstsprofiler/thread/c609d76c-be22-4ffb-858c-73ccab591a78/

But what should I do?

+4
source share
4 answers

This will happen when your program closes too soon before the profiler has the opportunity to collect any samples. Perhaps it’s somewhat typical when you kick the tires to see how it works, but you have not written any real code that can be profiled in a meaningful way.

For very short programs with little actual code, be sure to change the profiling mode. Use the Analyze + Performance Wizard and switch from “fetch” to “Instrumentation” mode. Instrumentation mode significantly slows down the program, but is much more accurate for very short programs.

+15
source

Are you sure the process is still running when the profiler starts? Looking at the message that the process identifier is invalid, it looks like the process could exit before the profiler had the opportunity to collect something.

+1
source

You can change the mode in the "Performance Explorer" window by right-clicking the project name (it should display "(Sampling)" after the name) and click "Properties". The very first option is a profiling method.

Additional information on the topic: http://msdn.microsoft.com/en-us/library/dd264994.aspx

0
source

I saw this problem when I forgot to "run as administrator" Visual Studio before trying the profile.

0
source

Source: https://habr.com/ru/post/1479087/


All Articles