The following describes profiling of local standalone applications.
Read about profiling ASP.NET on local machine here.
Read about profiling remote applications here.
To profile your application, launch the profiler (from Windows Start menu or from within Visual Studio). You will see the following controls on the Welcome screen:
(1) To profile a .NET application, profiling should be enabled. Only those applications can be profiled which were started when "Enable profiling..." was selected. If an application starts when "Enable profiling..." is not selected, you won't be able to profile it.
Click "except for..." to specify which applications should never start with profiling. By default, the list contains Visual Studio, MSDN Explorer and other standard applications.
(2) Specify whether CPU tracing should be enabled in applications to be started. Enabling CPU tracing adds performance overhead. If CPU tracing is not enabled, only CPU sampling will be available for performance profiling.
(3) In some cases, it may be useful to immediately start CPU profiling as soon as profiled application starts. The control allows you to choose desired option.
(4) Enable allocation recording (can add overhead). To immediately start allocation recording as soon as profiled application starts, select desired "Record each..." check box(es).
When profiling is enabled, simply start the application you wish to profile the way you usually do.
After that, connect to the profiled application to obtain profiling results.
