The Science (and Art) of Debugging
Prof. Andrew C.R. Martin, UCL
50-75% of software development effort is spent in debugging!
Efficient debugging uses the scientific method -
- Exploit assertions
- Simplifying failures - reduce a large input file that creates a
problem to the region that causes the error
- Track origins - find the part of the code that causes the
- Reproduce failures - capture and replay inputs to your program to
reproduce the bug (and statistical debugging - collect data that allow
one to track which parts of the program are most likely to be related
to the failure)
- Learn from mistakes - mine information to find bugs
- Scientific method
Follow the UDACITY
CS259 - Debugging tutorial.