Code · September 16, 2026
Find why your function is hanging in production
Paste the stack trace or error log along with the suspect function's code, and get a diagnosis of the real cause (not just the symptom) with the fix explained step by step.
The most frustrating bug is the one that only happens in production and never on your machine. This prompt gives the AI the context it needs to connect the stack trace to your actual code, so the diagnosis points at the real cause instead of a patch that just hides the symptom for a while.
For: ChatGPTClaude
Full prompt
Act as a senior engineer debugging a production incident. Don't guess: reason from the evidence I give you. Here's the context: - Language / framework: [E.G. NODE.JS, PYTHON, JAVA] - What the function or service is supposed to do: [E.G. PROCESSES PAYMENTS, GENERATES A REPORT] - Full stack trace or error log: [PASTE THE ERROR EXACTLY AS IT CAME OUT] - Code of the suspect function (and whatever it calls, if relevant): [PASTE THE CODE] - When it happens: [E.G. ONLY WITH CERTAIN USERS, AFTER RUNNING FOR X TIME, UNDER HIGH LOAD] - What you already tried (if anything): [E.G. RESTARTING THE SERVICE, ADDING A TIMEOUT] Give me: 1. **Diagnosis of the real cause**: what's actually happening (don't just repeat the error message), connecting the stack trace to the specific lines of code. 2. **Why it hangs or crashes** specifically in production and not in development, if applicable (e.g. concurrency, memory, slow external dependencies, data that doesn't show up locally). 3. **The fix** with the corrected code, explaining line by line what changed and why it resolves the cause, not just the symptom. 4. **How to prevent it from happening again**: a check, log, or test that would have caught it before it reached production. If the stack trace or code I gave you doesn't have enough information to be sure of the cause, say so clearly and ask for the exact missing piece (for example, "I need to see line X" or "I need to know which version of library Y you're using") instead of inventing a cause.
Short link: wandabuilds.ai/p/UwXe
Come back tomorrow for another, or see all prompts.