Create and open snapshots
This topic explains the steps to create a snapshot. After you have gathered the data, you can analyze the snapshot right away, save for later, or send to someone else.
You can use the default settings to profile most applications. Unless you are using Linux or want to use a custom profiler, no configuration is required: everything works out-of-the-box.
IntelliJ IDEA profiler supports the most common run configurations, including those running on an SSH, WSL, or Docker target. Application server run configurations are not supported, except for the local Tomcat run/debug configuration.
Start the profiling session
You can either start an application with the profiler, or attach to an already running application.
Start an app with the profiler
Press Shift+F10, select the run/debug configuration you want to profile, then select Profile with IntelliJ Profiler from the menu.
Alternatively, click the Run icon in the gutter. From the menu, select Profile with IntelliJ Profiler.
You can also profile applications that were launched in debug mode. For this, start the debugging session first, then attach the profiler to the running process.
Attach to a running process
With the process already launched, open the Profiler tool window.
On the Home tab, find the process that you are going to profile. Right-click it, then select Attach IntelliJ Profiler
The profiler will detach and save the snapshot automatically when the process terminates. Otherwise, if you want to leave the process running and only detach the profiler, you can do that manually.
Stop the profiling session
In the Profiler tool window, navigate to the tab that has opened for the process you are profiling and click Stop Profiling and Show Results.
The snapshot will open right away. Also, if you want to access it later, you can find it on the Home tab of the Profiler tool window. From this tab, you can view the recent snapshots or open snapshots that are stored elsewhere on your hard drive.
By default, the snapshots are stored in the user home directory. If you prefer another location, you can change that.
Change the snapshots location
Open the Profiler tool window.
On the Home tab, click More, then select Change Snapshot Folder.