To start profiling the project defined as the Startup Project in a solution, select Start Memory Profiler from the Profiler menu. To start profiling any project in the solution, use the right mouse button on the wanted project in the solution explorer and select Start Memory Profiler.
If a profiler project is set as active, it is also possible
to use the command
Start using Profiler
Project. This will
associate the started profiling session with the active profiler project, and
the settings from the profiler project will be used (except the Launch settings,
which are overridden by the solution project settings).
The profiler will use the Debug Mode setting under Debugging Configuration Properties of the project to decide how to start the profiler:
• Project
If the project is a Windows Application or Console
Application project, this will start profiling the application. The Command
Line Arguments and Working Directory properties are used to provide
arguments and the initial directory for the application.
If the project is
an ASP.NET project, then ASP.NET profiling will be started and the Start
Page will be requested.
Note that class libraries cannot be profiled
using this option.
• Program
Indicates that a specific program should be used to start profiling. For example, you might run a pre-built client that consumes your Class Library project. You must use the Start Application property to define what program to start.
• URL
Indicates that a particular URL (Start URL) should be accessed to initiate profiling. For example, you might access the URL to a web site that uses your Class Library project.
When the Start Memory Profiler command is selected, a new profiler session window will be created, and the process to profile is started directly.