Skip to main content
Profile runs a run configuration under an external sampling profiler. When the program exits (or you stop it), the IDE reads the samples and opens them in the Profiler tool window.

Profile a run

  • Use Run › Profile to profile the selected configuration.
  • Choose Profile ’…’ from the gutter run icon menu or from the run widget’s More Actions menu.
  • Profile Context Configuration (in Find Action…, ⌘⇧A / Ctrl+Shift+A) profiles the program or test at the caret.
The program runs in the Run tool window as usual. If the profiler is missing, a notification names it and offers Install (when there is an install command) or Download… (the profiler’s download page).

Supported runtimes

Setting up the profilers:
  • py-spy: the IDE looks next to the project’s interpreter first, then on the search path. Without a package manager it offers python -m pip install py-spy.
  • async-profiler: unpack a release from async-profiler releases and put its bin/asprof on the PATH, or set ASYNC_PROFILER_HOME to the unpacked folder. The IDE cannot install it for you.
  • perf: install your distribution’s linux-tools / linux-perf package.
Not supported: Bun and Deno programs, JVM programs on Windows, native programs and cargo run on macOS and Windows, and Maven or Gradle configurations.

Read the results

Each profiled run becomes a snapshot. The last five snapshots stay available as tabs in the Profiler tool window header. Each snapshot has three views: Double-click a frame or a row to open its source location. Type in Search frames in the header to highlight matching frames in the flame graph and filter the method list. Snapshots are kept only for the current session; they are cleared when you switch projects or close the window.