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?
Asked
Active
Viewed 4,255 times
2 Answers
8
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.

cklab
- 3,761
- 20
- 29
-
1You'll also need to make sure the firewall allows an incoming connection on the port where the debugger is listening. – Nate C-K Jul 19 '12 at 20:34
-
For an app server, like JBoss, i would usually set `suspend=n`. That lets the server start up normally, after which you connect, set a breakpoint somewhere in your request-handling code, and fire a request at it. Of course, if you need to debug the startup process, then you need `suspend=y`, but that's less common, at least in my experience. – Tom Anderson Jul 19 '12 at 20:35
1
I am assuming you have an IDE to do the debugging from - which in most case people use Eclipse.
- Need to set up your JBoss to allow debug connection
- Connect to your JBoss, on its debugging port, through Eclipse.
Check out this post JBoss debugging in Eclipse