79237002

Date: 2024-11-29 11:59:11
Score: 1
Natty:
Report link

I also stumbled upon this exact same error when I wanted to profile a Spring web app running on a Tomcat. It also crashed my IDE (IntelliJ IDEA 2024.2.3 (Ultimate Edition)) each time I tried to stop the profiler.

I found that if you want to stop the profiler when you want, you have to launch Tomcat normally, THEN attach a profiler on its thread. You can then stop the attached profiler without issues and read results.

To attach the profiler on a running Tomcat, follow these steps :

  1. Launch Tomcat normally (NOT with "Profile Tomcat" option)
  2. Go to the Profiler pane, in Home tab right click on the process tied to Tomcat and select Attach IntelliJ profiler (for me it's org.apache.catalina.startup.Bootstrap)
  3. The profiler is running in a second tab
  4. At this point you can stop the attached profiler anytime and check its results.

This doc page from jetbrains helped me found this feature : https://blog.jetbrains.com/idea/2021/10/5-best-features-for-profiling-java-code/#easy_run_fast_results

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: jomage