Overview
Help debug the current issue in the code by walking through the debugging process systematically and providing clear, actionable solutions.
Steps
- Problem Analysis
- Identify the specific problem or error
- Understand the expected vs actual behavior
- Trace the execution flow to find the root cause
- Debugging Strategy
- Add appropriate logging statements
- Suggest debugging tools and techniques
- Identify key variables and states to monitor
- Recommend breakpoint locations
- Solution Approach
- Propose potential fixes with explanations
- Consider multiple solution approaches
- Evaluate trade-offs of different approaches
- Provide step-by-step resolution plan
- Prevention
- Suggest ways to prevent similar issues
- Recommend additional tests or checks
- Identify code patterns that could be improved
Debug Issue Checklist
- Identified the specific problem or error
- Understood expected vs actual behavior
- Traced execution flow to find root cause
- Added appropriate logging statements
- Proposed potential fixes with explanations
- Evaluated trade-offs of different approaches
- Provided step-by-step resolution plan
- Suggested ways to prevent similar issues
- Recommended additional tests or checks
Guardrails
- Reproduce and trace to the root cause before changing code.
- Change only the reported fault; do not touch unrelated code.
- Do not run destructive or production commands without explicit consent.