Software Carpentry
Debugging


Introduction


You Can Skip This Lecture If...


What's Wrong with Print Statements


Symbolic Debuggers


Debugger Features


Kinds of Debuggers


Integrated Development Environments


Command-Line Debuggers


Inspecting Values


Controlling Execution


Under the Hood


Implementing Breakpoints


Inspecting More Values


Conditional Breakpoints and Watchpoints


Logging


Logging Levels


Logging Example


Agans' Rules


Rule 0: Get It Right the First Time


Rule 1: What Is It Supposed to Do?


Rule 2: Is It Plugged In?


Rule 3: Make It Fail


Alternatives


Rule 4: Divide and Conquer


Rule 5: Change One Thing at a Time, For a Reason


Rule 6: Write It Down


Rule 7: Be Humble


Summary