I made sure I’ve update my Gatling version to the latest release
I read the guidelines and how to ask a question topics.
I provided a SSCCE (or at least, all information to help the community understand my topic)
I copied output I observe, and explain what I think should be.
gatling-gradle-plugin: 3.15.1
My test is throwing NullPointer exceptions and I cant figure out why. I need it to pause the simulation at startup so that I can attach a debugger. However I am unable to do that.
This is what I have tried and the results.
- Passing in JAVA_OPTS before gradle. This just attaches to gradle, not the actual simulation
JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005" ./gradlew gatlingRun ....
- Adding jvmArgs to gatling closure does not work.
gatling {
jvmArgs [ "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005" ]
}
This gives
> Exception evaluating property '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' for java.util.Collections$UnmodifiableRandomAccessList, Reason: groovy.lang.MissingPropertyException: No such property: -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 for class: java.lang.String
- Passing in jvmArgs on command line
./gradlew gatlingRun --simulation <sim> --jvmArgs "agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005"
This gives:
No argument was provided for command-line option '-g'.
USAGE: gradlew [option...] [task...]
-?, -h, --help Shows this help message.
Please tell me how to get the simulation to pause at startup.