Programming

[DEMO] Python Debugger Notes

A compact demonstration article about making a debugging session easier to read and repeat.

Start with a small observation

This demo article treats a failing test as an observation to narrow, not a prompt to rewrite the whole program.

Record the input, the expected result and the first unexpected value before changing code.

  • Reproduce the failure
  • Name the smallest suspicious boundary
  • Change one assumption at a time

A repeatable loop

A short loop keeps debugging work visible and makes a later handoff much easier.

python -m pytest tests/test_parser.py -q
Back to Blog