Skip to main content
Loading page…
Python Mastery
Chapter 25
Lesson 3 of 4
Debugging Effectively
Contents
Notes
Tutor
Concept
Print Debugging vs a Real Debugger
Loading activity…
Previous
1 / 8
Continue
Contents
Notes
Discussion
Tutor
25 min
8 activities
0 of 8 done
In this lesson
1
Print Debugging vs a Real Debugger
2
Core pdb Commands: The Cheat Sheet
3
Inspecting and Modifying State in pdb
4
Bisecting Bugs: Finding the Root Cause
5
Check: pdb Command Behaviour
6
Pitfall: Leaving breakpoint() in Production Code
7
Practice: Debug a Buggy Function
8
Reflection: Debugger vs Print
Objectives
Drop into an interactive pdb session using breakpoint()
Use the core pdb commands: n, s, c, p, l, q, and where
Inspect and modify program state inside a pdb session
Articulate when a real debugger is preferable to print statements
Chapter 25 · Testing, Debugging & Performance
Testing with pytest
unittest & Mocking
Debugging Effectively
Profiling & Performance
Previous: unittest & Mocking
Next: Profiling & Performance