Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote debug in Tomcat 6

Does anyone know the steps to configure remote debugging in Tomcat 6 for GWT applications?

IDE - Eclipse

Sever - Tomcat6

Tech - GWT

I have gone through the following link, but it was not clear for me.

http://wiki.apache.org/tomcat/FAQ/Developing

I have done the following things:

  1. Placed the project war in 'Catalina_Home/webapps/project' which I wanted to debug remotely.
  2. Opened tomcat6w.exe and pasted java option under java tab as follows:

    -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

  3. Clicked on start. After starting the server, I have opened eclipse the configure the remote debugging with port 8000 and click on Debug.

  4. I have got the error message back saying that Failed to connect to remote VM. Connection refused.

Is there anything else that I am missing here. Please correct me if I am wrong any where.

like image 292
Jagadeesh Avatar asked Apr 17 '13 13:04

Jagadeesh


2 Answers

Use command line, go to your Tomcat folder ..\Tomcat6\bin and write command:

catalina jpda start

Wait until Tomcat will run (You will see something like) :

tomcat started

Then in eclipse: Debug -> Debug configuration -> Remote Java Application -> New

debug configuration Browse a project and debug!

like image 178
tostao Avatar answered Dec 06 '22 17:12

tostao


Use the following :

"-Xdebug" and "-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" in two different lines, without qoutes in tomcat6w.exe > Java tab > Java Options (before everything else) and apply.

Then you just need to configure a Remote Java Application profile in Debug Configuration of Eclipse for your project and point it to the same jpda port.

like image 33
Gaurav Avatar answered Dec 06 '22 18:12

Gaurav