Start in Debug Mode under IntelliJ Idea

Questions about YourKit Java Profiler
Post Reply
thhart
Posts: 1
Joined: Mon Jan 10, 2022 10:36 am

Start in Debug Mode under IntelliJ Idea

Post by thhart »

Hi,

from time to time I would like to start a profile session in Debug mode of Idea. Is it possible to configure this as default startup or to add a button for this? Right now I have a standard Run Profile button available only.

BR
Thomas

PS: I am aware running in debug mode is not optimal for deep profiling.

IntelliJ IDEA 2021.2.4 (Ultimate Edition)
Runtime version: 11.0.13+8-b1504.49 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Start in Debug Mode under IntelliJ Idea

Post by Anton Katilin »

Hi Thomas,

It's not possible to mix profiling with "Debug" in IDEA via the "Profile" action. It always works in the "Run" mode.

As a workaround, please manually add appropriate -agentpath JVM option to your run configuration and use Debug; you'll need to start the profiler UI manually and connect to the profiled process.

The simplest way to generate the option is to use "Profile local Java..." action at the profiler's Welcome screen and choose "Other Java application".

Best regards,
Anton
Post Reply