4.3. Testing and debugging¶
Very few programs work first time! This could be due to a simple mistake like a typo, or due to something quite subtle that you weren’t anticipating happening. Often a program will largely do what you want, but in some cases will crash or do something unexpected, and these corner cases need investigating. Debugging is the process of going through your code to see what happens in particular cases, and resolving issues so that the code works satisfactorily.
You’ll soon find that debugging takes as long, if not longer, than writing the code in the first place! Some engineers specialize in verification and validation. That is, testing code rather than developing it in the first place.
There are lots of tools and techniques to help you with testing and debugging, and you’ll use some in this course.
EEEN11202 course notes