Library / Debug

Debug

Find root causes, reproduce failures, and fix bugs without guesswork.

5 prompts
Print-debug plan Instrument a hard-to-see bug, then clean up after. Debug logging diagnosis
Add targeted logging to narrow down <issue>. Tell me exactly what output to look for and what each value would mean. Once we've found the cause, remove the logs.
Open ↗
Regression bisect Pin a regression to the exact change that introduced it. Debug regression diff
This worked before my recent changes. Review the diff in @<files> and identify which specific change most likely caused <symptom>. Explain the mechanism.
Open ↗
Reproduce then fix Turn a bug into a permanent regression test. Debug testing regression
Write a minimal failing test that reproduces this bug and confirm it fails. Then fix the underlying cause and show the same test passing.
Open ↗
Root-cause first Understand a bug before touching any code. Debug diagnosis triage
Here's the error: <paste>. Don't fix anything yet — trace the root cause, list the top 2 hypotheses ranked by likelihood, and tell me which files to look at.
Open ↗
Stack-trace triage Get a fast, precise read on where a crash originates. Debug diagnosis errors
Given this stack trace <paste>, point to the exact line responsible and explain in 2 sentences what is null/undefined/throwing and why.
Open ↗