使用 Eclipse 远程调试 Tomcat [英] Remote debugging Tomcat with Eclipse

查看:30
本文介绍了使用 Eclipse 远程调试 Tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法通过 Eclipse 调试 tomcat 应用程序.我已经设置了

I can't seem to debug the tomcat application through Eclipse. I've set

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

然后我运行bin/catalina.sh,我看到输出说它正在端口8000上监听dt_socket.但是每当我尝试连接到 Eclipse 中的端口 8000(通过在远程 Java 应用程序菜单中添加一个条目)时,它都会抱怨连接被拒绝.有什么想法吗?

and then I run bin/catalina.sh, where I see output saying it's listening for dt_socket on port 8000. But whenever I try to connect to port 8000 in Eclipse (by adding an entry in the remote java application menu), it complains about a refused connect. Any ideas?

推荐答案

你能检查一下这是否有效吗?

Can you check if this works?

JPDA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n"

catalina.sh jpda start

这篇关于使用 Eclipse 远程调试 Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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