Search code examples
javatomcatintellij-ideaprofiling

Error message when trying to run profiler in IntelliJ


I'm trying to use the integrated profiler in IntelliJ (I tried both IntelliJ Profiler and Async Profiler, to no avail) to look for performance bottlenecks in a web application, running a Tomcat I run from IntelliJ. Everything seems to work, I start my server using the profiling icon (green triangle with something looking like a watch), it starts, and when I get to the Profiler tab, I have a "Profiling: Eloi local" and a time counter, and also a buttong "Stop Profiling and show results".

But when I click on that button I get the foloowing error: profiler error: can't stop profiler jattach output 'jvm.dll not loaded by target process'

I'm using IntelliJ Ultimate Edition 2023.3, Tomcat 9.0.73 and Java 11. It runs on Windows 10.

Our application actually runs usually with Java 8, but it seems profiling in IntelliJ doesn't work on Java versions older than 9 anymore, so I upgraded. I got the same message, and some messages online said it was because of the version of Java. Changing the version didn't change a thing, though.

The application works fine when I run it the usual way, without profiling. i even works fine with profiling, but I can't get any information out of it.

I don't understand what I'm doing wrong.


Solution

  • Ok, I finally got it.

    Actually, you need to stop the server first, and then the data the profiler collected is presented in a diagram. If you stop the profiler, you get an error message. It's a bit of an odd behavior, but once you know it, it's ok.