eclipse远程调试 [英] Remote Debugging in eclipse

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

问题描述

我有一个在服务器A中运行的应用程序。开发环境在服务器B中。
我正在尝试在服务器A中运行的应用程序进行远程调试。



在服务器A中,我向服务启动脚本添加了以下命令。

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

服务正在服务器A中运行。 >

当我尝试启动远程调试配置时,它将提供

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

端口4554在服务器A中是免费的。



需要做什么其他配置?



Regards
Dheeraj Joshi

解决方案

尝试这个。


  1. 设置suspend = y,只是为了确保你有JVM线对。这将在启动时停止虚拟机,直到您连接。

  2. 如果您使用unix,请启动终端并尝试 telnet [host] [port] - 这将很快让您知道是否有任何东西侦听该主机上的该端口。

  3. 确保eclipse中的连接属性设置正确。请注意,端口默认为8000。

  4. 使用IP地址而不是主机名来排除DNS /主机文件问题。



启动我成功使用的JVM的另一种方法是:

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


I have an application running in server A. The dev environment is in server B. I am trying to do remote debugging of app running in server A.

In server A i added following command to service start script

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

And service is running in server A.

When i try to launch remote debugging configuration it gives

Failed to connect to remote VM. Connection refused. Connection refused

port 4554 is free in server A.

What other configuration need to be done for this?

Regards Dheeraj Joshi

解决方案

Try this.

  1. Set suspend=y, just to make sure you got the JVM line right. This should stop the VM on startup until you connect.
  2. If you're on unix, bring up the terminal and try telnet [host] [port] - this will quickly let you know if there's anything listening to that port on that host.
  3. Make sure the connection properties in eclipse are set correctly. Note that the port defaults to 8000.
  4. Use the IP address instead of the host name, to rule out DNS/hostfile problems.

Another way of starting the JVM that I use successfully is:

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

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

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