Preview
IB DP Computer Science — B2 Programming — Programming fundamentals | SL | B2.1.4
📋 What You Will Learn
- Distinguish syntax, runtime and logic errors — and which need debugging techniques
- Construct a trace table by hand to locate a fault in a loop
- Use print statements to expose the values a program actually computes
- Describe breakpoint debugging and step-by-step execution in an IDE debugger
- Choose the right technique for a given bug and justify the choice
🕵️ Why This Matters Debugging is detective work: the wrong output is the crime scene, and the program state is the evidence. Trace tables, prints, breakpoints and stepping are four ways of interviewing the same witness — the variables — until one of them contradicts your expectations. That contradiction is where the bug lives.
What You Are Hunting
📖 Definition — Debugging The systematic process of locating, diagnosing and correcting errors