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 ?
问题:
回答1:
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.
回答2:
Not directly AFAIK. Alternatively, you could use Eclipse Logfile Viewer to trail the tomcat log.