Remote debug in Tomcat 6

不羁岁月 提交于 2019-12-12 10:48:23

问题


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.


回答1:


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) :

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

Browse a project and debug!


回答2:


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.



来源:https://stackoverflow.com/questions/16061590/remote-debug-in-tomcat-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!