The VM option –add-opens=java.base/java.lang=ALL-UNNAMED does not work at all. If I run the Maven configuration with this setting I get the following error:
/bin/sh /Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/mvn -Didea.version=2025.2 -Dmaven.ext.class.path=/Applications/IntelliJIDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar -Djansi.passthrough=true -Dstyle.color=always --add-opens=java.base/java.lang=ALL-UNNAMED gatling:test -Dgatling.sameProcess=trueUnable to parse command line options: Unrecognized option: --add-opens=java.base/java.lang=ALL-UNNAMED
usage: mvn [options] [<goal(s)>] [<phase(s)>]
If I remove that VM option, I can run my Gatling test, but the debugger does not stop at my breakpoints at all. Can I get help in how to get this working?
Regarding `Unable to parse command line options: Unrecognized option: --add-opens=java.base/java.lang=ALL-UNNAMED`, I can only think of 2 possible sane explanations:
your `temurin-21` is actually NOT Java 21 => verify the Java installation it points to
you have some non printable character in your input => clean the “Run“ and “VM options“ input fields and fill them again manually, character by character
I can run my Gatling test, but the debugger does not stop at my breakpoints at all
Make sure you use up-to-date Gatling and gatling-maven-plugin versions.
I can confirm that updating my pom.xml to use the pom from the Java example project (which among other things upgrade Gatling to the latest version) fixes the issue with the debugger.
I’m seeing breakpoints being hit during scenario setup:
However, when I actually try to run the scenario (the setUp function), I get the following exception:
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:4.20.1:test (default-cli) on project publisher-perf-tests: Gatling failed.: InvocationTargetException: module java.base does not open java.lang to unnamed module @2d683b2d -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Disconnected from the target VM, address: '127.0.0.1:57164', transport: 'socket'
@omair Please read my previous messages about the IntelliJ IDEA bug. You NEED this VM option.
If you want to make things work, you must either restore a previous version of IDEA, or wait for the fix.