dij_0983
Junior Poster in Training
50 posts since Nov 2011
Reputation Points: 10
Solved Threads: 1
If it's Eclipse-based you just have to run your app in debug mode for full execution & variable tracing
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
Actually i have written a small program on division, now i want see the control flow means how the line of code is executing and calling the methods and function step by step.
But when am run the program in debug mode nothing is showing
You must first place a breakpoint. You place somewhere in your code and when you debug, the code runs up until that point and stops. You can then see all the values of the variables that have been initialized up to that point. Then you have some options where you can continue line by line and observe the code and the values.
To place a breakpoint in eclipse simply right click at the left side of the editor where the line numbers are.
javaAddict
Nearly a Senior Poster
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
Anywhere you want. Normally you put one at the place where you want to start tracing, eg on the first line of the main method.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
I mostly debug in SpringSource (which is Eclipse based) so I'm just speaking about Eclipse and SpringSource here.
you can start debugging, jumpt to the next executed line, to the next executed line in the same class, to the next line you run over which has a breakpoint on it, ...
the different steps you choose by pushing f5-f6-f7-f8.
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433