Showing posts with label remote debugging. Show all posts
Showing posts with label remote debugging. Show all posts

Friday, April 30, 2010

How to configure eclipse and tomcat to run remote debugging:

Check this link: http://wiki.apache.org/tomcat/FAQ/Developing and this link
http://it.newinstance.it/2005/10/04/remote-debugging-tomcat-with-eclipse/

http://confluence.sakaiproject.org/display/BOOT/Setting+Up+Tomcat+For+Remote+Debugging


1)open catalina.bat and add the following lines :
set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=7945
Now stop tomcat from the services window if you have it installed as a service. Then run the following from a console:

[path to tomcat]\bin>catalina jpda start

In eclipse press Run->Debug Configurations..->Remote Java Application->press new button(on top)->
select the project : moodle-transfer -> enter as port : 7945 -> press Debug.
Now run the application in a browser after you have set a breakpoint in the source code,
then eclipse should propose you to turn to debug perspective, choose yes, then you should begin the debugging.
Note: if you get the following error: failed to connect to remote vm. connection refused. connection refused connect eclipse
then change the port number because it may be used by another application.