Debugging JMeter

by Gary Gregory

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.

  1. Open a command line and cd to the JMeter bin directory:

    cd C:\Java\apache-jmeter-2.8\bin

  2. 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.

  3. Start JMeter with one of the scripts in the bin directory:

    jmeter

  4. From you favorite IDE, mine is Eclipse, connect to the JVM running JMeter.
  5. Debug!
About these ads