PDA

View Full Version : How do you use the Java Debugger in Eclipse 3.6SR1?




wrldwzrd89
Oct 7, 2010, 05:02 PM
For the life of me, I cannot figure this thing out. I understand how you attach it to a program, by pressing Debug in the IDE rather than Run... but beyond that I'm lost.



bkap16
Oct 8, 2010, 08:46 AM
You need to set breakpoints in the code to pause the debugger. Double click in the gutter on the left side of the line you want to debug (the same part that shows the little icons for TODO comments, errors, and warnings) to create the debug point, double-click again to remove it. When you debug the program, it will automatically stop at those lines. You can then chose either to continue (keep going until the next debug point), step over (go to the next line in the code), or step in (step into the method currently being called and see what's going on in there as well)

wrldwzrd89
Oct 8, 2010, 10:46 AM
You need to set breakpoints in the code to pause the debugger. Double click in the gutter on the left side of the line you want to debug (the same part that shows the little icons for TODO comments, errors, and warnings) to create the debug point, double-click again to remove it. When you debug the program, it will automatically stop at those lines. You can then chose either to continue (keep going until the next debug point), step over (go to the next line in the code), or step in (step into the method currently being called and see what's going on in there as well)
Ah, thanks! That makes sense now. I was getting lost at how to set breakpoints.