Java JVM Eclipse远程调试,启用控制台 [英] Java JVM Eclipse remote debug with a console enabled

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

问题描述

当我在Eclipse中使用JVM机器上的运行JVM的JVM上运行的不同主机(如生产环境)附带运行的JVM时,有没有办法在控制台中得到STDOUT / STDERROR输出? / p>

解决方案

种类...



我最近设立了一个蚂蚁脚本将更新部署到远程服务器,然后自动重新启动它。重新启动脚本使用蚂蚁的putty的plink实用程序调用。重新启动脚本停止服务器,然后以远程调试模式启动它,以便我可以从我的本地eclipse链接到测试/调试。有趣的是,我没有启动服务器作为后台进程,所以所有的标准输出都被发回到plink并显示在eclipse控制台的ant输出中。
我不知道这可能是多么有用,因为输出前缀是通常的ant详细信息,蚂蚁任务在您停止远程服务器之前不会完成。



编辑:通过创建外部工具运行配置,通过调用plink启动远程环境,可以实现整个事情的进行。


When I attach to a running JVM in Eclipse using socket in a JVM machine running on a diffferent host like production environment, is there a way to get the STDOUT/STDERROR output in console too, i.e to have console enabled too ?

解决方案

Kind of...

I recently set up an ant script to deploy updates to a remote server and then automatically restart it. The restart script was called using putty's plink utility from ant. The restart script stopped the server, then started it in remote debug mode so I could link to it from my local eclipse for testing/debuging. The interesting thing though is that I did not start the server as a background process, so all the standard output was sent back to plink and displayed in the ant output in the eclipse console. I'm not sure how useful this maybe as the output is prefixed with the usual ant details, and the ant task does not finish until you stop the remote server.

Edit: on reflection the whole thing could be achieved far easier by calling plink to start your remote environment by creating an "External Tools" run configuration.

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

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