W WolfCode · CSC 141
Chapter 11 · Final

Debugging

调试

Syntax / runtime / semantic errors — what each one looks like and how to crack each. Read tracebacks bottom-up. Print debugging as the workhorse, pdb when print gets noisy. Strictly aligned with Think Python Appendix A.

Strict source: Think Python Appendix A

Lessons in this chapter

  1. 11.00 Worked Example
    Walkthrough: Print-Debug an Off-by-One
    例题: 用 print 调试 off-by-one
    python-debugging
    8 min
  2. 11.01 Exercise
    Spot the Bug
    找出 bug
    python-debugging
    20 min
  3. 11.02 Exercise
    Read the Traceback
    读 traceback
    python-debugging python-strings
    15 min
  4. 11.03 Exercise
    Print vs pdb
    print 和 pdb
    python-debugging
    20 min
  5. 11.04 Homework
    Homework: Fix the Test Suite
    作业: 修复测试套件
    python-debugging
    40 min

🎓 Course complete

This is the final chapter of CSC 141. After completing it you can write any first-semester CS program from scratch, read someone else's broken code, and debug your own. The toolkit is complete — the rest is practice on real problems.