🧰 Engineering Essentials · Debugging Craft
Hunt bugs systematically (PHP)
Reproduce, bisect, hypothesize, verify — the method that beats random poking under deadline pressure.
foundation~30 minAll Software Engineers
Steps
- 1Reproduce deterministically first; flaky repro = flaky fix
- 2Write failing test capturing the bug before touching source
- 3Bisect history or code path until minimal failing case remains
- 4Form ONE hypothesis, predict its observable, then check
- 5Fix root cause, not nearest symptom; add regression test
- 6Document the hunt briefly for future searchers
- 7Run static analysis (PHPStan/Psalm) at max level in CI
- 8Profile request cycles with Xdebug + cachegrind on real routes
Common Pitfalls
- ▲Shotgun changes stacking unknown unknowns
- ▲Fixing symptoms while root cause ships elsewhere
Commands
Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill debug-craft-systematic-bug-hunt-phpInstall globally
$ npx skills add aniruddhaadak80/skills --skill debug-craft-systematic-bug-hunt-php -gTags
#debugging#methodology#engineering-essentials#debug-craft