Reproduce → diagnose → fix
Debug from a confirmed reproduction and competing hypotheses instead of guessing at a patch.
Read this prompt as Markdown or plain text
When to use it
The prompt makes reproduction and falsifiable hypotheses gates before editing, so a plausible patch is not mistaken for a demonstrated fix.
Prompt
Debug [BUG OR FAILURE] in this repository. Work in this order: 1. Read the relevant repository guidance, error output, recent changes, and nearby tests. 2. Reproduce the failure before editing. Record exact steps, expected behavior, actual behavior, environment details, and the smallest useful error/log excerpt. If reproduction is impossible, say why and gather the strongest available evidence instead. 3. Trace the affected execution path and form at least two specific root-cause hypotheses. Rank them and define a falsifying check for each. 4. Test the hypotheses. Do not suppress errors, weaken tests, or add a broad fallback as a substitute for understanding the cause. 5. Implement the smallest fix that addresses the confirmed cause and follows existing project patterns. 6. Add or update a regression test that fails before the fix and passes after it. 7. Run the targeted test, the original reproduction, and the relevant broader checks. Finish with: - Root cause - Fix and files changed - Proof, including commands and results - Remaining risks or adjacent issues you deliberately did not change
Adapt it to your task
Condensed and made tool-neutral from GitHub Awesome Copilot's Debug Mode Instructions.
Third-party prompt. Source review does not establish benchmark performance or guarantee an outcome.
Source and license
Contributor: @aaronpowell. Repository: github/awesome-copilot.
License: MIT. Pinned commit: b95e24caae4f25c5985f8527fd092ccfed039c36.
Review: source-reviewed, . Compared with the commit-pinned source and adapted into a tool-neutral, copy/paste request. This is a non-visual task, so no output artifact is required.