Tuesday, January 1, 2013

How To Debug From Eclipse The Remote Java Applications - Improve Development Productivity

Debugging code you have written would be a very time consuming process if not debugging techniques are not used. Eclipse IDE is most preferred for developing Java Programs these days and eclipse comes with the feature of configuring and using the debugger.Using debugger, developer need not spend time placing Sys out statements in the code, run the program and see the console for print outputs. This method of debugging becomes a nightmare when you are dealing with complex java projects. Building and running such applications take considerable amount of time. In this post I'm going to show how to configure and debug the remote java programs.

1. Build the Java Application Jars using -g command line argument to generate only some debugging info
2. Run the remote java application using JVM debug options as java @agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y -jar remoteJavaApp.jar
3. Start remote debugging through eclipse with source code attached. From debug configuration create settings for 'Remote Java Application' using the port address and attach the source code of our application.

Under Eclipse define debugger as shown in the following picture,

 

Configure External (Remote) Java program as shown below
  
 

Enter remote Java application details in the new configuration as shown below.


Click run button to launch the remote java application and then attach the Eclipse debugger from the "Debug" icon and there you go debugging your remote java application.

Monday, December 31, 2012

Technoladder Wishes All Readers A Very Happy New Year 2013!

2012 has been a wonderful starting year for this technoladder.blogspot.com blog and there has been a good response in the initial year. The blog is going to bring more technical articles, tips and tricks that are really essential for people in information and internet technologies in the coming years. Hope you enjoyed all the technical articles in this blog in 2012 and the blog assures that you'll do enjoy reading more technical articles, personal experiences, tips & tricks in the coming years and technoladder wishes you a very happy and prosperous new year 2013!
 
Related Posts Plugin for WordPress, Blogger...