News and Articles on Technology, Finance and Marketing

Remote debugging JBoss in Eclipse

It is hard to debug an application outside of an IDE. Setting up a Remote Debugging Configuration in Eclipse is really easy so that you can debug your application from within Eclipse.

First set the JBoss server to debug mode by setting the debug options in the bin/run batch/startup script file.

The debugging provided by JBoss is based on the Java Platform Debugger Architecture (JPDA). Set the JAVA_OPTS variable as follows:

set JAVA_OPTS= -Xdebug -Xnoagent  
-Xrunjdwp:transport=dt_socket,address=8787,
server=y,suspend=n %JAVA_OPTS%

The different debug parameters are:

  • -XDebug - Enables debugging
  • -Xnoagent - Disables previous debugging agent.
  • -Xrunjdwp - Specifies the connection mechanism, the transport address, and server and suspend values.

Now simply start the JBoss server.

Second step is to create a Debug Configuration in Eclipse. Open Eclipse, go to Run->Debug Configurations... and select Remote Java Application. Now click on New Launch Configuration.

Provide a name for the configuration, then select the project, leave the Connection Type and Host(provide the hostname if the JBoss server is running on a different machine) and the Port you provided above, in this example enter 8787.

That's it, now your remote debugging setup is ready! Click on the Debug button to start debugging your application running on JBoss.

Happy debugging!

Share:

No comments:

Post a Comment

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to our feed and get articles like this delivered automatically to your feed reader? Like our Facebook Page.

About Us

About Us
We provide you the latest news on technology, finance and entertainment across the globe. Fell free to contact us for any questions or concerns.

Popular Posts

Blog Archive

Recent Posts

Definition List

Definition list
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Unordered List

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Aliquam tincidunt mauris eu risus.
  • Vestibulum auctor dapibus neque.

Pages