Start Profiling Session from Visual Studio
Supported OS: Windows
dotMemory integrated in Visual Studio lets you profile the currently opened solution, more specifically, a particular run configuration.
Run configurations let you 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 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.
In the Visual Studio menu, select ReSharper | Profile | Run Startup Project Memory Profiling. This will open the Profile Startup Project window.
In the Profile Startup Project window, configure profiling settings as described in Configure Profiling Session.
Click Start.
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 information about them, refer to the ReSharper documentation.
Select the created run configuration in the Build & Run tool window.
In the Build & Run tool window, click
Start memory profiling.
Profiling of run configurations for static methods can be started using the action list of the particular static method.
Place the caret at the method and press AltEnter
In the list, select Debug method | Profile (Memory) method.
You can also start profiling of an arbitrary application rather than a particular run configuration.
In the Visual Studio menu, select ReSharper | Profile | Run Application Memory Profiling.... This will open the Profile Application window.