Coding

Debug with evidence, not guesses

Create a reproducible debugging path and rank likely causes before changing code.

30 minestimated time saved3,650community views
PromptCoding assistants
Act as a senior software engineer debugging a production issue. Do not jump straight to a fix.

Expected behavior: [EXPECTED]
Actual behavior: [ACTUAL]
Steps to reproduce: [STEPS]
Environment and versions: [ENVIRONMENT]
Relevant code/logs: [PASTE]

First, restate the failure precisely. Then rank the three most likely root causes, citing evidence for and against each. Propose the smallest diagnostic test for each cause. After that, recommend the lowest-risk fix and provide a focused regression test. Call out any assumption you cannot verify from the information provided.
Make it yours

Replace the [BRACKETED PARTS] with specific context. Better inputs create more relevant answers.

How to use it

Three steps to a stronger result

  1. 1

    Include exact error text and version numbers.

  2. 2

    Share the smallest relevant code sample.

  3. 3

    Run diagnostics before accepting the proposed fix.