Debugging roadmap
Most bugs are one of eight shapes. Work through them in this order, and each box fills in as you fix its challenges. Start wherever your boxes are emptiest.
Stage 1
Read the error
Bugs that crash with a message. Learn to trust the traceback.
Cannot read properties of undefined, NoneType has no attribute, NaN appearing from nowhere.
73 challengesTry one →Totals that concatenate, sorts that put 10 before 9, comparisons that refuse to run.
129 challengesTry one →The loop that runs one time too many, the slice that drops the last item, the index that starts in the wrong place.
79 challengesTry one →
Stage 2
Follow the logic
The code runs and gives the wrong answer, or never stops.
Stage 3
Track the state
Which variable is this, and who else is holding it?
Stage 4
Mind the timing
Things that happen in the wrong order. Interview favourites.
A missing await, unbuffered channel deadlocks, ConcurrentModificationException, and data races under load.
26 challengesTry one →
New to all of this? The 30 Days of Debugging path picks one bug a day for you. Want the theory behind a box? Each one links to its bug pattern guide.