Introduction to debugging - Introduction to debugging...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to debugging Testing is the process of running the program against test cases to try to uncover errors. Debugging is the process of looking for the cause of an uncovered error and then fixing it —once the cause has been found. Often the cause is far removed from the place at which the error manifests itself. Some people hate debugging, seeing it as a long, arduous, and frustrating task, like looking for a needle in a haystack. Others enjoy it, seeing is a problem solving activity that requires the skill of a detective, who looks for evidence and sifts through it, trying to find out who committed a crime. There are two basic methods for tracking down a bug: 1. Use the debugging feature of your IDE. In most IDEs, you can turn on the "debugger", which allows you to step through execution of the program one statement at a time, watching how the values of the variables change. You can also set "breakpoints", and then let execution run its course, and it will stop whenever a breakpoint is reached and let you investigate values of variables. 2.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/07/2008 for the course CS 101 taught by Professor Gries during the Spring '08 term at Cornell University (Engineering School).

Page1 / 2

Introduction to debugging - Introduction to debugging...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online