Remote debugging jsystem tests

To debug the runner/test running on a remote machine do the following:

1. To debug the runner, add the following java property to runner activation command:
-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
2. To debug a test Add the above line to the property test.vm.params in the; this will allow you to debug test execution.
3. In the Eclipse: goto the debug dialog –> Remote Java Application–>New Launch Configuration – Standard (socket Attach) , host – the host of the machine on which the runner is running, port the port above (in this example 8787)

Please note the suspend property, if it is set to true the runner will not start running until you connect with the debugger.

When adding debug parameters (or jmx parameters) to the test vm parameters:
For example: -classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket
and running in run.mode=2 or 4, the first test runs okay, the second test fails
to bind to the port 8787 since it is occupied by the previous jvm.
(it takes the jvm ~10 seconds to close)
To solve this problem, the user can enter the following:
… ,address=${8787},server=y,suspend=y
The system will replace the pattern ${XXX} with the first free
port starting at XXX.
In our example, if port 8787 is free the port will be ..,address=8787,server=y,suspend=y
if port 8787 is not free the system will bind to
…,address=8788,server=y,suspend=y etc’

Fork me on GitHub