Documentation.NET Profiler 4.0 HelpRunning applications with profilerManually enable profiling of local applications
previous      content      next
Manually enable profiling of local applications

The following describes how to manually enable profiling of local applications.

Note that in most cases, it is easier to automatically enable profiling. Please use the manual enabling only if automatic enabling does not work in your case for some reason.

Should you need to profile remote applications, read here.

1. Make Sure the Profiler Is Installed

The profiler installer not only creates necessary files, but also registers profiler agent DLL.

2. Set Up a Profiling Environment

Specify the following two environment variables:

set COR_PROFILER=GUID
set COR_ENABLE_PROFILING=1

GUID is unique for each profiler version (even minor). Please find its value in <Profiler Installation Directory>\guid.txt Pay attention that GUID starts with { and ends with }

You may need to restart Windows. For detail, please refer to the following MSDN article

Special notes on profiling a Windows service can be found here.

3. Run the Application

If profiling was properly enabled, the profiled application should start with the profiler agent.

To ensure it has started with the profiler, check whether log file has been created:
<user home directory>\.ynp\log\<PID>.log

4. Connect to the Application

The profiled application should appear on the Welcome screen of the profiler. If it does not, please refer to Local profiling troubleshooting.

Connect to the profiled application to obtain profiling results.

previous      content      next