IntelliJ IDEA versions 4.5, 5.x, 6.0 and 7.0 are supported.
Plugin installation
To enable integration, you should install the profiler plugin.
Note: If you had installed the plugin from an older YourKit Java Profiler version (4.0 or earlier), the plugin wizard may fail to uninstall the old plugin. This may cause a conflict of the two plugin versions on IDEA startup. To avoid this, it is recommended that you first manually remove the old plugin from IDEA (IDE Settings | Plugins) and only then install the new one.
To install the plugin, run the profiler.
When you run the profiler for the first time or after updating to a newer profiler version,
you will be automatically prompted to install the plugin. Also, you can explicitly launch the plugin installation wizard
via Tools | Integrate with IDE....
Profiling from IDEA
After the plugin is installed, the Profile actions are added to the main toolbar ...
... to the main menu ...
... and to context popup menus:
You can profile J2SE and J2EE applications and applets.
Additional launch parameters can be configured in the "Run/Debug Configurations" dialog, "Startup/Connection" tab of the selected configuration.
The "Profile" action starts the profiled application, and connects to it in profiler UI (unless opposite behavior is configured). The output of the profiled application appears in console, same as for "Run" action.
Navigation action
When profiling applications, you usually need to browse the related source code to understand the performance problems at hands. After the problem is located, you edit the source code to fix it.
Instead of forcing you to tell profiler where the source code of your application is located
and showing the code in feature-restricted custom-made "editor surrogate", YourKit provides an alternative approach.
When you have a method, class or field selected in the profiler UI,
just invoke Tools | Open Declaration in IDE Editor (F7),
to automatically open the underlying source code in the editor of your IDE - the best place to browse and edit code.
The navigation action works on the current selection and is available in both CPU and memory views. Take note of the extremely useful ability to locate the code of anonymous classes and their methods, which is a very difficult thing to do manually.
