Debugging: Root Cause, Then Change (Strict)
Locate the root cause first, then give the smallest change and how to verify it
Prompt
Copy it whole, then replace the brackets with your own contentHandle this coding task: Debugging: root cause before changes. Code/error: [paste] Environment: [language/version/framework] Requirements: Find the root cause first, then the minimal change and how to verify it. Give your assessment first, then the change, then how to verify it. Strict mode: list your assumptions and uncertainties first; do not write numbers you cannot support; end with one counterexample or risk.
Replace the text in [ ] with your own situation; ask long tasks in stages.
How to get better results
Read this before you fill it inGive the conclusion and impact scope first, then only the changed snippets (no full files), and finally one check that proves it works. Flag risky spots separately.
If problems remain after the fix, paste the new error and the changed snippet back; keep debugging on the original approach, don't switch approaches and rewrite.
More like this: Writing code prompts · All prompts