[英]Tomcat debugging not possible through eclipse
I've made a script called debug.sh
and placed it under the bin directory (start it with ./debug.sh
) to start Tomcat 8 in debugging mode: 我制作了一个名为
debug.sh
的脚本,并将其放在bin目录下(以./debug.sh
启动),以在调试模式下启动Tomcat 8:
set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
bash catalina.sh jpda start
But if it started, there is now message which says, that Tomcat is listening on port 8000. Also if I type 但是,如果开始,现在会出现一条消息,提示Tomcat正在侦听端口8000。同样,如果我键入
netstat -nat
there is no application listening on port 8000. 没有在端口8000上侦听的应用程序。
What exact configuration do I have to set, to remote debug my Tomcat 8 server which is running on a specific IP or do I have just a little problem in my script? 我需要设置什么确切的配置来远程调试运行在特定IP上的Tomcat 8服务器,或者我的脚本中只有一点问题?
This answer has been updated following the comments, I did not understand the problem in the first place. 注释之后,此答案已更新,我一开始不理解问题。
I guess you have followed that doc : this is about developing Tomcat itself. 我猜您遵循了该文档 :这是关于开发Tomcat本身的。
I am not sure you are using the proper way to configure the port (I don't know your specific configuration details). 我不确定您使用的是正确的方式来配置端口(我不知道您的特定配置详细信息)。 In a standard environment, the ports are configured in the server.xml (note that several different ports are used by Tomcat for the different services).
在标准环境中,端口是在server.xml中配置的(请注意,Tomcat为不同的服务使用了几个不同的端口)。
To remotely monitor your server, you should use a JMX client. 要远程监视服务器,应使用JMX客户端。 As far as I know, Eclipse doesn't include one (or at least not one documented) - you could code one as this is a Java specification (JSR262) .
据我所知,Eclipse不包含一个(或至少没有一个已记录的文档)-您可以编写一个,因为这是Java规范(JSR262) 。 You have one in a standard Java environement ( JConsole ).
您在标准Java环境( JConsole )中拥有一个。 By default, JMX is not enabled on Tomcat.
默认情况下,Tomcat上未启用JMX。 If you need to enable it, the fine way is to follow the doc .
如果需要启用它,最好的方法是遵循doc 。
Tomcat JMX monitoring and JConsole are both available in most versions of Tomcat and the Java runtime. Tomcat JMX监视和JConsole在大多数Tomcat版本和Java运行时中均可用。
The following exchange seems to be about your problem. 以下交流似乎与您的问题有关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.