Showing posts with label Debug. Show all posts
Showing posts with label Debug. Show all posts

Thursday, August 15, 2013

Running a Debug in Eclipse: (Also useful for Remote Java application)



Running a Debug in Eclipse:

(Also useful for Remote Java application)

We just need to connect the sourcecode in eclipse to your eclipse debug (that will automatically detect a running tomcat on your machine) .

*   Open Eclipse 
* Select Debug Configuration (below the Bug Picture)
It opens the following  panel
Select the Remote Java Applications menu from the left panel
Fill the name of the debug in which you want to run
Browse and select the source code on which debug should run
(P.S. You don’t need to change Host and Port generally for any tomcat running on local system)
Click on Debug , and its  Done .

* Note : If an error message appears like following  then your debug is already running.


Go to debug perspective (For both purpose either to close or look into already running Debug)

And Click on this symbol to close the already running Debugger .


Or To Use the Debug , Do some action on the web application ,like in my case I am submitting a form


The Debug appears at the point you added the debug




Press F8 (which is also Resume button),that will take you to the break point from there debug each line with F6.
If you want to go to next break point press F8.