2

I am trying to debug my remote application. In one of my project documents I found these steps.

  • Set run time Parameter in Java control panel:

    -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8000,suspend=y

  • in Eclipse, Run->Debug Configurations... Choose Remote Java Application from the list. Click on the New launch configuration button in the upper left. Name the new configuration. Change the Connection Type to Standard (Socket Listen). Click on Apply, then Debug.

I followed these steps, and in eclipse I got "waiting for vm to co... port 8000...".

It never ends... I Googled it but couldn't find the resolution.

4

3 回答 3

1

听起来 Eclipse 和 JVM 都在等待另一个连接到它。我认为您需要在 Eclipse 中选择 Socket Attach,而不是 Socket Listen。

于 2013-11-09T09:59:21.377 回答
1

尝试以下 JVM 配置,

-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y 
于 2013-11-09T09:25:34.433 回答
1

假设你的远程容器在 192.0.0.0 运行,那么你必须在远程服务器的 jvm 中添加调试参数。

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

然后在你的本地机器上运行 eclipse。在本地机器启动 eclipse,Run->Debug Configurations... 从列表中选择 Remote Java Application。单击左上角的新启动配置按钮。命名新配置。将连接类型更改为标准(套接字侦听)。确保在连接属性下将服务器主机指定为 192.0.0.0,将端口指定为 8000,然后单击应用,然后单击调试。

于 2013-11-09T09:30:41.767 回答