如何在远程机器上调试war文件? [英] How do I debug a war file on a remote machine?
问题描述
如果我有一台jboss服务器在另一台机器上运行,并将我的war文件拷贝到该机器上,那么我如何调试这个战争?我会使用什么命令?
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?
推荐答案
使用远程机器上的调试参数运行jboss:
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
暂停
- 将阻止应用程序的执行,直到调试器连接(如果希望应用程序在调试器连接之前,请指定 n
)
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)
如果使用Eclipse,则调试为远程Java应用程序
。您只需提供调试项目,远程机器的IP和您指定的端口。
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.
这篇关于如何在远程机器上调试war文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!