Introduction

There are a number of different kinds of bugs. Following are the three main types of bugs that get harder and harder to fix.

  1. Compile time errors — bugs caught by the compiler.
  2. Terminating Runtime errors — bugs caught by the runtime resulting in the termination of the program.
  3. Non-Terminating Runtime errors (Logic errors) — bugs that occur at the runtime, and are most often unwanted or unexpected results in response to user actions. Logic errors are generally the hardest to fix, since their origin is not always known.

For this lab you will need to download and import your assignment Lab 6. In order to import this assignment, follow the instructions given in the next page.

Although in this Lab you would be learning how to debug your code using the Eclipse Debugger, using it to find errors in your code should be a last resort. Whenever errors occur in your code, you should first have a look at your code and think about how or why the error occurred. Most of the times, you would be able to locate the error just by carefully examining the syntax of your code, or reflecting on the logic you have applied. Compared to this strategy, making use of a debugger is generally considered a time consuming process. Hence, you should resort to a debugger only after you are done examining at your code manually, and still unable to locate the error.