CSC 216 F09/Debugging S: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page is a work in progress
==Step by Step Debugging==


==Debugging S==


Step by step debugging.


===The problem===
===The problem===


This exercise is an intro into debugging.  It focuses on the step over and step into tools in Eclipse.<br>               
This exercise is an intro to debugging.  It focuses on the step over and step into tools in Eclipse.<br>               
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.
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===
===Participants and props===


Made by David Long, Dustin Geckler, and Parker Beaman
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.


It was created in Flash, using <blank> frames and screenshots of Eclipse to show where each step over and step into will lead.
The flash file [http://www4.ncsu.edu/~dclong2/debug.swf]


The flash file <link>
Made by David Long, Dustin Geckler, and Parker Beaman


===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.