xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex issues
How it fires
How this command gets triggered: by you, by Claude, or both.
/xdebugContext preview
What this command does when you run it.
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex issues
description: Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complex issues tags: [debugging, troubleshooting, errors, sub-agent]
Debug and analyze errors with root cause identification and fix suggestions. For complex debugging sessions, automatically delegates to the Debug Specialist sub-agent for persistent context and deep analysis.
**Analyze recent errors:**
/xdebug
**Debug specific error:**
/xdebug "ImportError: No module named 'requests'"
**Debug failing test:**
/xdebug test_user_login
**Help and debugging options:**
/xdebug --help
If $ARGUMENTS contains "help" or "--help": Display this usage information and exit.
Parse the error or issue from $ARGUMENTS. If no specific error is provided, check for recent errors: !tail -50 *.log 2>/dev/null | grep -i "error\|exception\|failed" || echo "No recent errors in log files"
**Decision Point: Quick Analysis vs Deep Debugging**
Determine if this requires simple analysis or complex debugging session:
**Simple/Quick Issues** (handle directly):
**Complex Issues** (delegate to Debug Specialist sub-agent):
**For Complex Issues:** Use Task tool to delegate to debug-specialist:
Use the Task tool with: description: "Complex debugging analysis" prompt: "Acting as Debug Specialist sub-agent, analyze this error: [ERROR_DETAILS]. Provide comprehensive root cause analysis, systematic troubleshooting steps, and solution validation." subagent_type: "debug-specialist"
**For Simple Issues, continue with direct analysis:**
Based on the error context, perform the following debugging steps:
1. **Error Classification**:
2. **Root Cause Analysis**:
3. **Environmental Factors**:
4. **Test Isolation**:
For Python errors, gather additional context: !python --version !pip list | grep -E "(package1|package2)" 2>/dev/null
For JavaScript/Node errors: !node --version !npm list --depth=0 2>/dev/null
Think step by step about the debugging process:
1. What is the exact error message and where does it occur? 2. What are the possible causes based on the error type? 3. What code changes or environmental factors might have triggered this? 4. What are the most likely solutions?
Provide debugging assistance in this format:
๐ DEBUG ANALYSIS โโโโโโโโโโโโโโโโโโโโโโโโโโโโ Error: [Error type and message] Location: [File:line or component] ๐ ROOT CAUSE [Detailed explanation of why this error occurs] ๐ง SUGGESTED FIX [Step-by-step fix with code examples] ๐ VERIFICATION [Commands or steps to verify the fix works] ๐ก PREVENTION [How to prevent this error in the future]
If the error involves a specific file mentioned in the error message, examine it: @<error_file_path>
For test failures, run relevant tests: !python -m pytest <test_file> -v 2>/dev/null || npm test <test_file> 2>/dev/null
Provide specific, actionable debugging steps rather than generic advice.
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Automate git workflow - stage, commit with smart messages, and push to specified branch