简体   繁体   中英

Java JVM Eclipse remote debug with a console enabled

当我使用在生产环境等不同主机上运行的JVM机器中的套接字连接到Eclipse中正在运行的JVM时,有没有办法在控制台中获取STDOUT / STDERROR输出,即是否也启用了控制台?

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.

Not directly AFAIK. Alternatively, you could use Eclipse Logfile Viewer to trail the tomcat log.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM