Wednesday, March 29, 2006

Debugging JNLP WebStart application

I have finally succeed in debugging my webstarted app using IDEA. It is the JAVAWS_VM_ARGS which save lot of my time.

Basically, IDEA can remote debug virtually any app as long as it is started with some special arguments. The bad news is that not all of those arguments are allowed to be specified in the JNLP file. Finally I found this forum thread which gave some enlightment.
http://forum.java.sun.com/thread.jspa?threadID=569693&messageID=4039981

I added this entry to my ~/.bash_profile.

export JAVAWS_VM_ARGS="-Xdebug -Xnoagent -Djava.compiler=NONE \
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"