Eclipse使用jboss进行远程调试 [英] Eclipse Remote debugging with jboss

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

问题描述



到目前为止,



如何使用JBOSS服务器4.x版本在Eclipse中配置远程调试? p> Step1 :我修改了run.confg文件。通过取消注释下面的行。用于远程套接字调试的示例JPDA设置:

  JAVA_OPTS =$ JAVA_OPTS -Xrunjdwp:transport = dt_socket,address = 8787,server = y,suspend = n

Step2 :然后我在调试中配置了Eclipse配置这是说:

 无法连接到远程VM。拒绝连接。 


解决方案

您所要求的不是特定于Java EE或JBoss 4.x - 您可以调试任何Java进程,以防在启动JVM时指定远程调试运行时参数。



在您的设置中, -Xdebug 参数缺失,所以你的行将是:

  JAVA_OPTS =$ JAVA_OPTS  - Xdebug -Xrunjdwp:transport = dt_socket,address = 8787,server = y,suspend = n

它应该能够连接,以防您使用正确的主机和您指定的端口8787.如果它仍然不工作,很可能是阻止端口的防火墙问题。


How can I configure remote debugging in Eclipse with JBOSS server 4.x version?

So far,

Step1: I have modified the run.confg file. By uncommenting the below line. Sample JPDA settings for remote socket debugging:

JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

Step2 : Then I configured Eclipse in debug configurations. It's saying:

Failed to connect to remote VM. Connection refused.

解决方案

What you are asking is not specific to either Java EE or JBoss 4.x - you can debug any Java process in case you specified the remote debugging runtime parameters when starting the JVM.

In your setting the -Xdebug parameter is missing, so your line would be:

JAVA_OPTS="$JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

Now it should be able to connect, in case you are using the correct host and your specified port 8787. In case it's still not working, it's most likely a firewall issue blocking the port.

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

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