dotTrace 2016.1 Help

Starting Local Profiling Session

The main usage scenario of dotTrace integrated in Visual Studio is profiling the currently developed application. For this purpose, in this mode, dotTrace offers some additional profiling capabilities. More specifically, it allows you to profile not just a particular project, but a particular 'run configuration'.

Run configurations is a feature introduced in ReSharper 9.2. It gives you an ability to create a number of predefined configurations with different run parameters for your startup project, an arbitrary executable, or even any static method*. For example, you can create a number of configurations that will differ by CPU architecture and CLR version. These configurations can be used to quickly run or debug your project without the need to set up particular run parameters each time. As dotTrace shares the ReSharper platform, it is able to profile any run configuration.

By default, your solution has only one run configuration - the configuration for the startup project.

In this section:

To start profiling of a startup project:

  1. Do one of the following*:
    • If you did not yet create any run configurations, in the the Visual Studio menu, select ReSharper | Profile | Run Application Performance Profiling....
    • If you have more than one (default) run configurations, the Visual Studio menu, select ReSharper | Tools | Run Configurations... and choose the [project_name] (VS Startup) configuration. Then select ReSharper | Profile | Run Application Performance Profiling....
    This will open the Profile Application window.
  2. In the Profile Application window, configure profiling settings as described in Configuring Profiling Session.
  3. Click Run.

To start profiling of a specific run configuration:

  1. Create a run configuration for your project, executable, or particular static method. To do this, in the Visual Studio menu, select ReSharper | Tools | Run Configurations... | Add, select the corresponding item. This will open the window with run configuration options. For more details on them, refer to the ReSharper documentation.
  2. Select the created run configuration using the Visual Studio menu ReSharper | Tools | Run Configurations... | [run_config_name] | Configure | Select.
  3. In the Visual Studio menu, select ReSharper | Profile | Run Startup Configuration Performance Profiling.... This will open the Profile Startup Project window.
  4. In the Profile Startup Project window, configure profiling settings as described in Profiler Options .
  5. Click Run.

You can also use the Performance Profiler window to quickly start profiling of a particular run configuration.

To quickly start profiling of a specific run configuration:

  1. Create a run configuration for your project, executable, or particular static method. To do this, in the Visual Studio menu, select ReSharper | Tools | Run Configurations... | Add, select the corresponding item. This will open the window with run configuration options.
    For more details on them, refer to the ReSharper documentation.
  2. Open the Performance Profiler window using the Visual Studio menu ReSharper | Profile | Open Performance Profiler.
  3. In the Performance Profiler window, in the ThemedIcon.Run.Screen.[Gray] list, select profiling type.
  4. In the Performance Profiler window, in the run configurations list, select the created configuration.
  5. Click ThemedIcon.Run.Screen.[Gray].

Note that profiling of run configurations for static methods can be started using the action list of the particular static method.

To quickly start profiling of a static method run configuration:

  1. Open the action list for the method by placing cursor on the method and pressing Alt+Enter.
  2. In the list, select Debug | Profile([profiling_type]). Note that this session will use the profiling type that is currently selected in the Performance Profiler window.
  3. Specify run configuration parameters and click Execute to start profiling or Save and Execute to save this run configuration and start profiling.

If you want to profile an arbitrary application from Visual Studio (rather than a particular run configuration), you have such a capability. In this case, starting a profiling session looks almost the same as in dotTrace Standalone.

To start profiling of an application:

  1. In the Visual Studio menu, select ReSharper | Profile | Run Application Performance Profiling... . This will open the Profile Application window.
  2. In the left panel of the Profile Application window, select the type of application you are going to profile.
  3. In the right panel, configure profiling settings as described in Configuring Profiling Session.
  4. Click Run.

To start profiling of an already running process:

  1. In the Visual Studio menu, select ReSharper | Profile | Run Application Performance Profiling... . This will open the Profile Application window.
  2. In the left panel of the Profile Application window in Attach to Process, select the .NET process you are going to profile. Only processes running on .NET Framework 4.0 or higher are displayed and available to attach.
    If a process you are looking for is missing, click Refresh to update the list of processes and/or click Show All Processes to grant dotTrace administrative permissions (this will show more processes running in the system).
  3. In the right panel, configure profiling settings as described in Configuring Profiling Session. Note that Tracing and Line-by-line profiling types are not supported when you attach the profiler to a process.
  4. Click Run.
Last modified: 19 August 2016