Debugging and Problem Solving for Developers
Read errors, use debuggers, isolate bugs and fix them for good.
Taught by Anisha Rai · Senior Software Engineer
What you'll learn
- Read error messages and stack traces to locate where and why a failure began
- Reproduce bugs reliably and reduce them to a minimal reproducible example
- Set breakpoints, step through code and inspect variables in VS Code, Chrome DevTools and pdb
- Add structured, levelled logging that makes problems visible without flooding output
- Isolate regressions quickly with binary search and git bisect
- Fix bugs for good with regression tests and a clear root-cause write-up
About this course
This debugging and problem-solving course is for beginner and junior developers who lose hours to bugs and want a calm, repeatable way to find and fix them. You will learn to read error messages and stack traces, reproduce a bug reliably and shrink it to a minimal reproducible example that isolates the cause. You will use real debuggers, setting breakpoints and stepping through code in VS Code, Chrome DevTools and Python's pdb, and add logging that helps rather than drowns you. You will narrow down regressions with binary search and git bisect, then fix bugs for good with regression tests and a short root-cause write-up. Examples use Python and JavaScript, but the method works in any language. You only need to be able to write and run simple programs in either language.
Course content
7 lessons- 1The Debugging MindsetTreat debugging as a scientific process of observation, hypothesis and experiment rather than random guessing.Preview
- 2Reading Error Messages and Stack TracesDecode error messages and stack traces in Python and JavaScript to find where a failure began.
- 3Reproducing Bugs ReliablyTurn vague bug reports into reliable reproduction steps and reduce them to a minimal reproducible example.
- 4Using a Debugger: Breakpoints and SteppingPause running code with breakpoints, step through it and inspect state in VS Code, Chrome DevTools and pdb.
- 5Logging That Helps You DebugAdd structured, levelled logs with context so you can debug problems you cannot reproduce on your machine.
- 6Isolating Bugs with Binary Search and git bisectHalve the search space to find which input, code change or commit introduced a bug.
- 7Fixing Bugs for GoodFind the root cause, add a regression test and write a short root-cause write-up so the bug never returns.