Debug Applet Follow
http://www.nakov.com/blog/2008/08/20/debugging-java-applets-in-eclipse/
First enable remote debugging in the Java Plugin:
a) Start –> Settings –> Control Panel –> Java –> Java Applet Runtime Settings –> View
b) Add the following to the “Java Runtime Parameters”:
-Djava.compiler=NONE -Xnoagent -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
This will enable remote debugging on TCP port 8000 for all applications running inside the Java Plugin (in Internet Explorer). Make sure this port is not used by other applications.
3) Close all Web browser windows
4) Put breakpoints in your source code (you need to have an Eclipse project containing the applet source code)
4) In Eclipse create a remote debugging configuration:
a) Run –> Open Debug Dialog –> Remote Java Application –> New
b) Assign host = localhost and port = 8000
Press the “Debug” button and enjoy debugging.
Note: Don’t forget to build your applet with debug information (javac -g). I am building my applet with ant so I just added <javac debug=”true” … />.
Comments
0 comments
Please sign in to leave a comment.