๐Ÿงฉ
๐Ÿงฉ Problem Solving ยท PRB-101 ยท Session 8 of 8

Debug Anything: A Systematic Approach

When something's broken and you don't know why โ€” code, a process, a plan โ€” panic and random poking waste hours. A systematic debugging method finds the cause fast.

โฑ 8 min read๐Ÿ“… Updated 2026-07-20๐Ÿ“Š Tables, charts & examples

Something's broken and you don't know why. It could be code, a business process, a recipe, a plan. The amateur response is panic and random changes; the systematic one calmly narrows down the cause. Debugging is a general problem-solving skill โ€” the same method works far beyond computers.

The systematic debugging loop

Replace random poking with a repeatable method:

StepWhat to do
1. Reproduce itMake the problem happen reliably โ€” you can't fix what you can't see
2. Narrow it downCut the space in half: where is it, where isn't it?
3. HypothesizeForm a specific guess at the cause
4. Test one thingChange ONE variable and check
5. RepeatUntil the real cause is cornered

The heart of it is narrowing โ€” systematically halving where the problem could be until it's cornered, rather than randomly changing things and hoping.

Change one thing at a time

The cardinal rule, and the one people break under pressure.

๐ŸŽฏ
One change, then test. Change five things at once and 'fix' it, and you have no idea which mattered โ€” or whether you introduced a new problem. Isolate variables: one change, observe, repeat. It feels slower but is far faster than the chaos of changing everything and hoping.

When you're really stuck

  • Check your assumptions โ€” the bug is often in something you were 'sure' was fine.
  • Explain it to someone (or a rubber duck) โ€” describing it out loud often reveals the answer.
  • Take a break โ€” fresh eyes spot what tired ones miss.
  • Simplify โ€” strip it back to the smallest case that still breaks.

๐ŸŽฏ Key takeaways

  • Debugging is a general skill โ€” the systematic method works far beyond code.
  • Follow the loop: reproduce, narrow down, hypothesize, test one thing, repeat.
  • The heart of it is narrowing โ€” halve where the problem could be until it's cornered.
  • Change one thing at a time; when stuck, check assumptions, explain it aloud, and simplify.

Frequently asked

What's the biggest debugging mistake?

Changing several things at once. If it starts working, you don't know which change mattered or whether you added a new problem. Isolate variables โ€” one change, then test โ€” even though it feels slower, because the alternative is chaos.

How do I find the cause of a problem systematically?

Reproduce it reliably, then narrow it down by repeatedly cutting the space in half โ€” where is it happening, where isn't it? Form a specific hypothesis, test one variable, and repeat until the real cause is cornered. It beats random poking every time.

What do I do when I'm completely stuck?

Check the assumptions you're 'sure' about (the problem often hides there), explain it out loud to someone or even a rubber duck, take a break for fresh eyes, and simplify to the smallest case that still breaks. These reliably shake loose stuck problems.

๐ŸŽ“ Final session complete

You've finished the Problem Solving sessions

Now lock it in with the coursework.

Do the assignments โ†’

Related lessons

More in this course

Course home → · Browse all courses →