artyushov / idea-jmh-plugin

Plugin for Itellij IDEA to make benchmarking with JMH easier.
MIT License
445 stars 43 forks source link

Cannot debug a benchmark #15

Open vkorenev opened 9 years ago

vkorenev commented 9 years ago

When I press debug button the project is compiled but after that nothing happens.

artyushov commented 8 years ago

Actually, I didn't imply such possibility. I tried to remove the option to debug from the context menu, but haven't succeeded in 1 hour and going to give up on it :)

l0rinc commented 8 years ago

Try debugging with @Fork(0), worked for me :)

NathanSweet commented 6 years ago

Fork 0 worked for me to debug in Eclipse.

perlun commented 5 years ago

For reference, @Fork(0) didn't work for me in IntelliJ, the Debug button still seems to do nothing when the compilation is finished.

l0rinc commented 5 years ago

After adding the JMH plugin to Idea you may have to enable annotation processing.

perlun commented 5 years ago

@paplorinc I seem to have annotation processing enabled (under Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors). Is this the same setting you were thinking about or something else?

l0rinc commented 5 years ago

Try attaching a main method to it, like: http://hg.openjdk.java.net/code-tools/jmh/file/5984e353dca7/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_01_HelloWorld.java#l95

alejandro-pushground commented 2 years ago

Please try with:

  1. @Fork(0)
  2. Rebuild Project

IMHO it's a "synchronization" between the JMH annotations processing (code generation) and the IntelliJ IDEA.