CSC 216 F09/Debugging S: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 24: Line 24:
===Participants and props===
===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. <br>
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. <br>
Anyone can download the file and go through the exercise on their computer.
Anyone can download the file and go through the exercise on their computer.


Line 33: Line 33:
===The script===
===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.
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.

Latest revision as of 02:09, 17 November 2009

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.