I am facing few problems while setting up my application for debug mode. I am using Tomcat5.5 and Eclipse 3.2. I am using Win-XP
I have made the following entry
1. Added these two environment variables: JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket
2. I have added the following entry in tomcat GUI control under the Java tab in Java Options textbox Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
3. Have configured in my eclipse debug for remote java application using the option in Run->Debug with appropriate port=8000 and host(localhost).
Also my code resides on E:\MyProjects\FundTransfer
To deploy the application on Tomcat there is ANT file which I need to run which creates a war file in webapps of Tomcat.
I am stuck as in Tomcat5 we had a command for debug "catalina jpda start". What is it in Tomcat5.5.
Also have a doubt if I define a XML file int the CATALINA_HOME\conf\Catalina\localhost folder having only the <Context> entry, I need to point the docbase attribute to E:\.... till the folder which has WEB-INF in it? OR to the folder to which the war gets exploded and the folder containing the WEB-INF there?
Pointers and suggestions for same are greatly appreciated.
then start tomcat standalone without Eclipse or MyEclipse use command:
tomcat will rise up and it will open debug port 8000 (or whichever you specified) Open Your IDE and tune Remote Debug on your host (if you start it locally - then localhost), specifi transport as dt_socket and port 8000. Start debuger in your IDE - now it is possimbe to catch breakpoints.
The second way is to run your tomcat directly from your IDE as a java application in debug mode. Exadel plug-ins do this, MyEclipse does, IDEA does also. Not all IDEs support this feature, but almost all support remote debug. Anyway If You refer Tomcat docs You even can start it as a plain console java application in debug mode.
The advantage of Remote Debug - you can use it even with remotely located servers.