Remote debugging with Java Virtual Machine

In order to remote debug a JVM export the following java options:

export JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n -XX:MaxPermSize=1024m"

I got this information from this site

After exporting these java options in the shell where you start the jvm you like to debug, you can use your favorite IDE to connect to port 8888 at localhost in order to start debugging.