GuideAdvanced

Debugging and Troubleshooting

Take an unknown failure — a thirty-line traceback, a silently wrong result, a regression buried under two hundred commits, or a test that fails once every thirty runs — and learn to reproduce it, corner it down to the exact line, and explain it with evidence, before asking a model anything; and when you do ask, learn to verify whether the answer is correct. The six modules move from reading the failure (what a traceback is already telling you) to the method that goes from symptom to root cause, to the debugger for stopping the program and looking inside, to logging for diagnosing what already happened, to bisection for cornering regressions and intermittent failures, and close with AI in the loop: using it after you understand the error, not instead of understanding it. The final project is a debugging dossier on a repository with five failures of different natures — including a regression that requires `git bisect run` — resolved with protocol, evidence, and a regression test.

48
lessons
6
modules
English · Spanish
available in
Yes
certificate
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Read a complete Python traceback — including a chained one or one from async code — and pinpoint the file, the line, and the culprit frame in your own code
  • Tell the symptom apart from the root cause, reproduce a bug reliably, and reduce it to a minimal reproducible example (MRE)
  • Formulate falsifiable hypotheses and recognize the reasoning biases that stretch out a debugging session: confirmation bias, "shotgun debugging", dead ends
  • Use a debugger — `pdb` and a graphical debugger like `debugpy` — to stop execution exactly where your hypothesis points, instead of printing blindly
  • Instrument with `logging` (levels, context, exceptions with a full traceback) to diagnose failures that already happened and that you can't reproduce live
  • Apply bisection — `git bisect`, isolation by layer and by data — to find the exact commit or condition that broke something
  • Turn an intermittent failure into a deterministic one by fixing seeds, time, execution order, or shared state
  • Run a verifiable protocol before asking a model for help, and verify its answer by reproducing the failure instead of applying the patch blindly
  • Close a bug with a root-cause postmortem and a regression test, not just with the symptom resolved

Before you start

What you need to bring

It's for you if...

  • Devs who paste a traceback into a model without having read it first, and want to break that habit
  • Devs who only debug with `print()` and want to master a real debugger: `pdb`, `debugpy`
  • Teams dealing with intermittent bugs, regressions buried in commit history, or failures that only happen in production
  • Anyone who wants to use AI to debug without falling into the "patch, new error, patch, new error" loop

Requirements and materials

  • Python at the level of functions, modules, and exceptions (`try/except`), and virtual environments
  • Basic Git: `commit`, `log`, `checkout` — no need for `bisect`, it's taught in the guide
  • Running scripts and commands from the terminal

Content

The syllabus, module by module

Open any of them to see its lessons.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!