CSC 216 F09/Debugging S

From Expertiza_Wiki
Jump to navigation Jump to search

Step by Step Debugging

The problem

This exercise is an intro to debugging. It focuses on the step over and step into tools in Eclipse.
Step Into enters the next method at the line of code currently being executed. to debug it, while Step Over executes the next method without entering it in the user interface. The purpose of this exercise is to simulate the process of finding errors in a program using Eclipse's tools. The sample program finds the areas of different polygons and polyhedrons.


Sample Code:

//calculate the surface area of a box
transformBox();
boxarea=boxArea();
System.out.println("Box Calculated= " +rectanglearea);
System.out.println("Box Expected= " +192);
public void transformBox(){
    width=length;              //(Error shown if Show error is clicked) width should equal height
}

Participants and props

Step by Step Debugging was created in Flash, using 18 frames and screenshots of Eclipse to show where each Step Over and Step Into will lead.
Anyone can download the file and go through the exercise on their computer.

The flash file [1]

Made by David Long, Dustin Geckler, and Parker Beaman

The script

Run the flash file. After hitting debug, you are able to choose Step Over or Step Into to examine the code further and find the errors.