JBoss server startup method:
Assume that the installation directory of JBoss is $ jboss_home, And the start methods of debug mode in Windows and Linux are as follows:
Windows:
Find the JBoss Startup File run. BAT in windows and search for 8787. You can find the following sentence:
Rem set java_opts =-xdebug-xrunjdwp: Transport = dt_socket, address = 8787, Server = Y, suspend = n % java_opts %
Remove the comment (I .e. remove rem) and restart JBoss with run. bat.
Linux environment:
Find the JBoss Startup File "Run. Sh" in Linux.
To retain the previous STARTUP configuration, we do the following:
# Cprun. Sh run-debug.sh
# Cp run. conf run-debug.conf
# Vi run-debug.sh
Find run. conf, change to run-debug.conf, and then save the run-debug.sh File
# Vi run-debug.conf
Search for 8787, you can find:
# Java_opts = "$ java_opts-xrunjdwp: Transport = dt_socket, address = 8787, Server = Y, suspend = N"
Remove comments
Restart JBoss.
#./Run-debug.sh
After the JBoss server is started, it listens on port 8787.
Eclipse settings
If you use eclipse as the IDE development environment, you can set it as follows:
After setting the connection to the JBoss server as shown in the figure, you can set a breakpoint in the program and execute the screen processing. Then, the debugging stops at the break point.
From: http://blog.csdn.net/haydenwang8287/article/details/2142877