dotMemory 2023.1 Help

Start Profiling Session from Visual Studio

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

Run configurations give 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 (each particular static method is run under a special JetLauncher process). 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 dotMemory 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.

To start profiling of a startup project

  1. In the Visual Studio menu, select ReSharper | Profile | Run Startup Project Memory Profiling.... This will open the Profile Startup Project window.

  2. In the Profile Startup Project window, configure profiling settings as described in Configure Profiling Session.

  3. Click Start.

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 in the Build & Run tool window.

  3. In the Build & Run tool window, click Buildandrun run mem profiling icon Start memory profiling....

Quickly start profiling of a static method

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

  1. Open the action list for the method by placing cursor on the method and pressing Alt + Enter.

  2. In the list, select Debug method | Profile (Memory) method.

You can also start profiling of an arbitrary application rather than a particular run configuration.

To start profiling of another application

  1. In the Visual Studio menu, select ReSharper | Profile | Run Application Memory Profiling.... This will open the Profile Application window.

  2. Start a profiling session.

Last modified: 21 March 2023