搜索

PythonReactSEOPDF
GitHub Skill

debugging

Systematic debugging with root cause investigation. NO fixes without understanding cause first.

nguyenthienthanh☆ 3 仓库 Stars2 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Debugging

Systematic debugging framework. Find root cause BEFORE fixing.


Core Principle

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

Random fixes waste time and create new bugs.


When to Use

  • Test failures
  • Bugs and errors
  • Unexpected behavior
  • Performance issues
  • Build failures
  • Before claiming "fixed"

Four-Phase Process

Phase 1: Investigate
  1. Read the error - Full message, stack trace
  2. Reproduce - Confirm the bug exists
  3. Check recent changes - git diff, git log
  4. Gather evidence - Logs, console output
Phase 2: Analyze
  1. Find working example - Similar code that works
  2. Compare - What's different?
  3. Identify pattern - Where does it diverge?
Phase 3: Hypothesize
  1. Form theory - "It breaks because..."
  2. Test minimally - Smallest change to verify
  3. Confirm - Does fix work?
Phase 4: Fix
  1. Write test first - Reproduces bug
  2. Apply fix - Single focused change
  3. Verify - Test passes, no regressions

Root Cause Tracing

When error is deep in call stack:

1. Start at error location
2. Trace backward: where did bad data come from?
3. Continue tracing until source found
4. Fix at SOURCE, not symptom

Verification Protocol

Iron Law: NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION

# Run verification
npm test  # or yarn test, pytest, etc.

# Check output
# THEN claim result

Wrong: "Should work now" Right: "Tests pass: [paste output]"


Red Flags (Stop & Follow Process)

  • "Quick fix for now"
  • "Just try changing X"
  • "It's probably X"
  • "Should work now"
  • "Seems fixed"

All mean: Return to Phase 1.


Quick Reference

Bug found
  → Phase 1: Read error, reproduce, check changes
  → Phase 2: Find working example, compare
  → Phase 3: Form hypothesis, test minimally
  → Phase 4: Write test, fix, verify

Deep stack error?
  → Trace backward to source
  → Fix at source, not symptom

About to claim fixed?
  → Run verification command
  → Read output
  → THEN claim result

References

For detailed techniques, see:

  • references/systematic-debugging.md - Full four-phase details
  • references/root-cause-tracing.md - Call stack tracing
  • references/verification.md - Verification protocols

Version: 2.0.0

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!