How do I debug a war file on a remote machine?

此生再无相见时 提交于 2020-01-04 01:50:28

问题


If I have a jboss server running on another machine and I scp my war file to that machine, how do I debug the war? what commands would I use? How do I do this in my terminal?


回答1:


Run jboss with the debug arguments on the remote machine:

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

address - this will be the port you want to connect on

server - signifies it will be the server

suspend - will block execution of the application until a debugger connects (specify n if you want the application to begin before a debugger connects to it)

If using Eclipse, Debug as a Remote Java Application. You simply provide the project to debug, the IP of the remote machine and the port you specified.




回答2:


I am assuming you have an IDE to do the debugging from - which in most case people use Eclipse.

  1. Need to set up your JBoss to allow debug connection
  2. Connect to your JBoss, on its debugging port, through Eclipse.

Check out this post JBoss debugging in Eclipse



来源:https://stackoverflow.com/questions/11568756/how-do-i-debug-a-war-file-on-a-remote-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!