Debugging: Finding errors

Errors in programs are called bugs. Removing those errors so that the program works correctly is called debugging.

There are two main types of errors.

The first type of error is syntax errors. Syntax errors prevent the program from running. They are also called compile errors. These errors are usually caused by misspelling words, leaving out required punctuation, or other types of typing mistakes. The compiler in a good IDE (integrated development environment) will usually point out these errors.

The second type of error is logic errors. With logic errors, the program runs but produces the wrong results. It could be something simple such as putting a decimal in the wrong place, or adding when you should have multiplied. But it can be much more complicated. These errors are sometimes very difficult to find.

Please study the material at each of the links below.

  1. Breaking a program
  2. Errors at end of line
  3. Finding logic errors
  4. Good habits for learning to program
Like us on Facebook:


OER: Open Educational Resource
Creative Commons License Author: Janet E. Joy; Publisher: Zebra0.com
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
Creative Commons Attribution-NonCommercial 4.0 International License
Last modified: May 18 2017 14:04:05.