Remote debugging eclipse
Debug project locally or remotely in eclipse are almost same you need to modify configuration accordingly
Debug java project while running jboss server from command prompt.
- Edit the run.bat file of JBoss to use the following debug options (note the suspend=n option, this tells the server not to wait till the debugger attaches itself to the server):
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%
- Start the server from the command line
- Once the server has completely started, Go to Eclipse project and create a new “Remote Java Application” debug session (if it’s not already created). In the “Port” text box specify 8787 (the same as what we have in the run.bat). Then click on Debug below is screen shot step by step instruction.
- Open your eclipse –> Click Run –> Debug configuration
- Double click Remote java application and enter value.Below is reference
- Click debug to start debugging. Put break point in your class.