如何远程调试运行在tomcat服务上的webapplication? [英] How to remotely debug the webapplication running on tomcat service?

查看:51
本文介绍了如何远程调试运行在tomcat服务上的webapplication?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 serverA 的 tomcat 6 上有我的网络应用程序.我正在运行 tomcat 作为服务,即通过 tomcat6w.exe 位于 /bin 文件夹下.远程调试weabbplication 我按照建议在网络上的不同博客/网站上添加了以下行,末尾的不同行没有空格.提到端口为 8443,因为应用程序在同一端口上运行.

I have my webapplication on tomcat 6 at serverA. I am running the tomcat as service i.e thru tomcat6w.exe lying under <tomcat_home>/bin folder. To remotely debug the weabbplication i have added below lines as suggested on different blog/sites on web in different line witout space at end. Mentioned the port as 8443 as application is running on same port.

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

现在通过服务器 B 上的 eclipse 我提到主机为 serverA 和端口 8443,然后单击调试.2-3 分钟后,它建立连接而没有出现任何错误.但是现在当我在 IE 中点击 webapplication url 时它没有显示并说 IE 无法显示网页.但是一旦我删除了上面提到的调试参数并点击网址,应用程序工作正常.当 tomcat 作为窗口服务运行时,我不知道应该如何调试应用程序?

Now thru eclipse on server B i mentioned host as serverA and port 8443 and click debug. After 2-3 minutes it establishes connection without giving any error.But now when i hit webapplication url in IE it does not show up and says IE can not display the webpage. But as soon as i remove the above mentioned debug parameters and hit the url, application works fine. I am not getting how should i debug the application when tomcat is running as window service?

参考以下是我双击tomcat服务时的参数

For Information Below are the parameters when i double click the tomcat service

--   Under java tab 
--jvm section value  
 C:\Program Files\Java\jre6\bin\client\jvm.dll

--java classpath section value  
 C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar

--java options section value  
 -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0
 -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0
 -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 6.0\common endorsed
 -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp
 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 -Djava.util.logging.config.file=C:\Program Files\Apache Software 
  Foundation\Tomcat6.0\conf\logging.properties-XX:MaxPermSize=512M
 -Djavax.net.ssl.trustStore=c:/.keystore
 -Djavax.net.ssl.trustStorePassword=changeit-Xdebug 
 -Xrunjdwp:transport=dt_socket,address=8443,server=y,suspend=n  

--Under startup tab

--class section value  
org.apache.catalina.startup.Bootstrap

--workingpath section value  
 C:\Program Files\Apache Software Foundation\Tomcat 6.0

--arguments section value  
 start

--mode section value  
 jvm

推荐答案

在 Java 选项选项卡中添加以下内容.记得放

In the Java Options tab add the below. Remember to put

-Xdebug 

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

SEPARATE LINE.

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

这篇关于如何远程调试运行在tomcat服务上的webapplication?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆