Prompts / Coding
Systematic Debugging
Walk through a bug methodically — identify root cause, rule out red herrings, and produce a reliable fix.
ClaudeChatGPTGemini
Prompt
I have a bug I need help debugging. Please work through it systematically. **Bug description:** [DESCRIBE WHAT IS HAPPENING vs. WHAT YOU EXPECT] **Error message (if any):** ``` [PASTE ERROR / STACK TRACE] ``` **Relevant code:** ``` [PASTE THE CODE] ``` **What I've already tried:** [LIST THINGS YOU'VE ATTEMPTED] **Environment:** - Language/Runtime: [e.g. Node 20 / Python 3.12] - Framework: [e.g. Next.js 15 / FastAPI] Please: 1. Identify the most likely root cause and explain why. 2. List 2–3 alternative causes to rule out. 3. Provide a step-by-step fix with the corrected code. 4. Suggest a way to prevent this class of bug in the future.
Tags: debuggingtroubleshootingroot cause
Want more prompts like this? Browse the full library or explore our AI tools directory.