1 / 7

Debugginng

Debugginng. The Plan. Define debugging Overview of how to debug Guided practice on PolarGrid.java Independent practice on RectangularGrid.java. What it is Solving runtime errors Stepping through code with anticipation Narrowing down the location of the bug Recreating the bug consistently.

edena
Download Presentation

Debugginng

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Debugginng CPS004 Spring 2004 http://www.cs.duke.edu/education/courses/spring04/cps004/

  2. The Plan • Define debugging • Overview of how to debug • Guided practice on PolarGrid.java • Independent practice on RectangularGrid.java CPS004 Spring 2004 http://www.cs.duke.edu/education/courses/spring04/cps004/

  3. What it is Solving runtime errors Stepping through code with anticipation Narrowing down the location of the bug Recreating the bug consistently What it is not Fixing compilation errors Stepping though code blindly Debugging Defined CPS004 Spring 2004 http://www.cs.duke.edu/education/courses/spring04/cps004/

  4. How to Debug • Be able to recreate the bug. • Identify the last place the code reaches during correct execution. • Anticipating what should happen next and step through the code. • When the unanticipated occurs, investigate why and fix the bug. CPS004 Spring 2004 http://www.cs.duke.edu/education/courses/spring04/cps004/

  5. PolarGrid.java This class is intended to eventually be used to layout objects in concentric circles: CPS004 Spring 2004 http://www.cs.duke.edu/education/courses/spring04/cps004/

  6. RectangularGrid.java This class is intended to eventually be used to layout objects in rows and columns CPS004 Spring 2004 http://www.cs.duke.edu/education/courses/spring04/cps004/

  7. Guided Practice • Go to the code link from the course website. Save Buggy.jar to the Desktop • Open up Eclipse, start a new project, and import Buggy.jar. • Run PolarGrid.java • Look over the source code for PolarGrid CPS004 Spring 2004 http://www.cs.duke.edu/education/courses/spring04/cps004/

More Related