Eclipse provides very useful debugging tools. In this lab you will learn how to use the Eclipse debugger to watch the values of variables as they change and control the execution of your code by stepping one line at a time and by setting breakpoints to pause execution at points in your code.
First, download the files Fraction.java and FractionTester.java. Start a new project in Eclipse and load these two source files.
Now, the instructor will play this 15 minute video on Debugging with Eclipse by Norm Krumpe. Follow along by performing the steps in your Eclipse session that are illustrated in the video. Ask the instructor to pause the video to discuss any questions you have.
The instructor will now lead you through the use of the Eclipse debugger to trace the behavior of the recursive method greatestCommonDevisor.
Now, download the file MazeBugs.java that is a version of the solution to P4. We recommend changing the font to "Courier", a fixed width font that will display mazes in a more readable form. You may search google for "eclipse console font" for help on doing this. Also download the file maze1 and set it to be the command line argument. Run it. Is the result correct? Use Eclipse to find and fix the bug. Also use Eclipse to trace the execution of the recursive method.
Show the instructor your MazeBugs.java code running correctly and sign the attendance sheet before you leave.