debug
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/debug
/debug
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.
Run a structured debugging session to find and fix issues systematically.
若你看到不熟悉的占位符或需要查看已连接的工具,请参阅CONNECTORS.md。
运行结构化调试会话,系统地排查并修复问题。
Usage
使用方法
/debug $ARGUMENTS/debug $ARGUMENTSHow It Works
工作原理
┌─────────────────────────────────────────────────────────────────┐
│ DEBUG │
├─────────────────────────────────────────────────────────────────┤
│ Step 1: REPRODUCE │
│ ✓ Understand the expected vs. actual behavior │
│ ✓ Identify exact reproduction steps │
│ ✓ Determine scope (when did it start? who is affected?) │
│ │
│ Step 2: ISOLATE │
│ ✓ Narrow down the component, service, or code path │
│ ✓ Check recent changes (deploys, config changes, dependencies) │
│ ✓ Review logs and error messages │
│ │
│ Step 3: DIAGNOSE │
│ ✓ Form hypotheses and test them │
│ ✓ Trace the code path │
│ ✓ Identify root cause (not just symptoms) │
│ │
│ Step 4: FIX │
│ ✓ Propose a fix with explanation │
│ ✓ Consider side effects and edge cases │
│ ✓ Suggest tests to prevent regression │
└─────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────┐
│ DEBUG │
├─────────────────────────────────────────────────────────────────┤
│ 步骤1:重现(REPRODUCE) │
│ ✓ 明确预期行为与实际行为的差异 │
│ ✓ 确定准确的重现步骤 │
│ ✓ 界定问题范围(何时开始出现?影响哪些用户?) │
│ │
│ 步骤2:隔离(ISOLATE) │
│ ✓ 缩小问题涉及的组件、服务或代码路径范围 │
│ ✓ 检查近期变更(部署、配置修改、依赖更新) │
│ ✓ 查看日志和错误信息 │
│ │
│ 步骤3:诊断(DIAGNOSE) │
│ ✓ 提出假设并进行验证 │
│ ✓ 追踪代码执行路径 │
│ ✓ 确定根本原因(而非仅表面症状) │
│ │
│ 步骤4:修复(FIX) │
│ ✓ 提出修复方案并附上说明 │
│ ✓ 考虑副作用和边缘情况 │
│ ✓ 建议添加测试以防止问题复发 │
└─────────────────────────────────────────────────────────────────┘What I Need From You
我需要你提供的信息
Tell me about the problem. Any of these help:
- Error message or stack trace
- Steps to reproduce
- What changed recently
- Logs or screenshots
- Expected vs. actual behavior
请告知我问题详情,以下信息将有所帮助:
- 错误信息或堆栈跟踪
- 重现步骤
- 近期的变更内容
- 日志或截图
- 预期行为与实际行为的差异
Output
输出格式
markdown
undefinedmarkdown
undefinedDebug Report: [Issue Summary]
调试报告:[问题摘要]
Reproduction
重现信息
- Expected: [What should happen]
- Actual: [What happens instead]
- Steps: [How to reproduce]
- 预期结果:[应该发生的情况]
- 实际结果:[实际发生的情况]
- 步骤:[重现方法]
Root Cause
根本原因
[Explanation of why the bug occurs]
[解释bug出现的原因]
Fix
修复方案
[Code changes or configuration fixes needed]
[所需的代码修改或配置调整]
Prevention
预防措施
- [Test to add]
- [Guard to put in place]
undefined- [需添加的测试]
- [需设置的防护机制]
undefinedIf Connectors Available
若已连接连接器
If ~~monitoring is connected:
- Pull logs, error rates, and metrics around the time of the issue
- Show recent deploys and config changes that may correlate
If ~~source control is connected:
- Identify recent commits and PRs that touched affected code paths
- Check if the issue correlates with a specific change
If ~~project tracker is connected:
- Search for related bug reports or known issues
- Create a ticket for the fix once identified
如果已连接监控工具:
- 拉取问题发生时段的日志、错误率和指标数据
- 展示可能相关的近期部署和配置变更
如果已连接源代码控制工具:
- 识别近期触及受影响代码路径的提交和PR
- 检查问题是否与特定变更相关
如果已连接项目跟踪工具:
- 搜索相关的bug报告或已知问题
- 确定修复方案后创建工单
Tips
提示
- Share error messages exactly — Don't paraphrase. The exact text matters.
- Mention what changed — Recent deploys, dependency updates, and config changes are top suspects.
- Include context — "This works in staging but not prod" or "Only affects large payloads" narrows things fast.
- 准确分享错误信息——不要转述,精确的文本至关重要。
- 说明近期变更——近期部署、依赖更新和配置修改是首要排查对象。
- 提供上下文信息——「预发布环境正常但生产环境异常」或「仅影响大负载请求」这类信息能快速缩小排查范围。