Here is how to see how JMeter (2.8) does it’s work from the insider’s point of view: a debugger. This note will also help you debug your own custom JMeter code.
- Open a command line and cd to the JMeter bin directory:
cd C:\Java\apache-jmeter-2.8\bin
- Set the JVM_ARGS environment variable:
set JVM_ARGS=-agentlib:jdwp=transport=dt_socket,server=y,address=8000
Note that there are no spaces in the value. The port 8000 must be free. You may choose another port.
- Start JMeter with one of the scripts in the bin directory:
jmeter
- From you favorite IDE, mine is Eclipse, connect to the JVM running JMeter.
- Debug!
I guess it’s unversal way to debug java applications, not only JMeter. Isn’t it?
The part that is JMeter specific is the JVM_ARGS environment variable which is used by the JMeter scripts.