Chain-of-Thought Debugger
Step-by-step code debugging prompt that asks AI to think through the problem before providing solutions
Content
Analyze the following code and error step by step: Code: ``` {{code}} ``` Error Message: ``` {{error_message}} ``` Instructions: 1. First, describe what the code is trying to do 2. Identify the exact line(s) causing the issue 3. Explain WHY the error occurs (root cause) 4. Propose 2-3 alternative fixes with trade-offs 5. Provide the corrected code Think through each step before answering.
Related Prompts
REST API Documentation Writer
Generates complete, developer-friendly REST API documentation from endpoint details including request/response examples, error codes, and authentication.
Reasoning Model Debug Prompt (Chain-of-Thought Code Fixer)
Uses chain-of-thought reasoning to systematically diagnose and fix code bugs, explaining each step of the reasoning process before proposing a fix.
Technical Debt Audit & Refactoring Plan
Analyzes a codebase description or code sample to identify technical debt, prioritize refactoring opportunities, and produce an actionable cleanup plan with effort estimates.
AI Agent System Behavior Tester
Generates a comprehensive test suite of adversarial, edge-case, and functional prompts to stress-test any AI agent or chatbot for reliability, safety, and performance.