Skip to content

Commit d0a11a4

Browse files
committed
Update document for debug
1 parent be3ebd9 commit d0a11a4

File tree

1 file changed

+62
-33
lines changed

1 file changed

+62
-33
lines changed
Lines changed: 62 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,64 @@
11
---
22
title: Debugging with AI DevKit
33
description: Learn how to systematically debug issues using AI DevKit's structured debugging workflows
4-
order: 5
4+
order: 4
55
---
66

7-
## Use `/debug` for Systematic Problem Solving
7+
Debugging with AI assistants often becomes a guessing game—trying random fixes until something works. The `/debug` command changes this by providing a structured methodology that ensures you understand the problem before attempting a solution.
88

9-
When issues arise, the `/debug` command provides a structured 7-step methodology to identify, analyze, and resolve problems systematically.
9+
## When to Use `/debug`
10+
11+
Use this command when:
12+
- Something isn't working as expected
13+
- You're facing a bug you can't immediately explain
14+
- You need to troubleshoot performance or integration issues
15+
- You want a systematic approach instead of trial-and-error
16+
17+
## Quick Example
18+
19+
Here's what a `/debug` session looks like:
1020

11-
```bash
12-
# In Cursor or Claude Code
13-
/debug
1421
```
22+
You: /debug
23+
24+
AI: What issue are you experiencing?
25+
26+
You: Users are getting a 500 error when trying to upload images larger than 5MB.
1527
16-
### The 7-Step Debugging Process
28+
AI: Let me help you debug this systematically.
29+
30+
**Step 1: Gather Context**
31+
- What's the expected behavior? (Users should upload images up to 10MB)
32+
- When did this start? (After last deployment)
33+
- Error logs? (Request entity too large)
34+
35+
**Step 2: Clarify Expectations**
36+
Based on your requirements doc, the upload limit should be 10MB.
37+
Current config shows: maxFileSize: '5mb'
38+
39+
**Step 3: Reproduce & Isolate**
40+
I can reproduce with any file > 5MB. The issue is in the upload middleware.
41+
42+
**Step 4-7: Analysis → Solution**
43+
Root cause: Config mismatch between frontend (10MB) and backend (5MB).
44+
Recommended fix: Update backend config to match requirements.
45+
```
46+
47+
## The 7-Step Debugging Process
48+
49+
The `/debug` command follows a proven methodology:
50+
51+
| Step | Purpose |
52+
|------|---------|
53+
| **1. Gather Context** | Understand what's happening vs. what should happen |
54+
| **2. Clarify Expectations** | Confirm requirements and success criteria |
55+
| **3. Reproduce & Isolate** | Create reliable reproduction steps |
56+
| **4. Analyze Causes** | Identify potential root causes with evidence |
57+
| **5. Surface Options** | Present multiple resolution approaches |
58+
| **6. Confirm Path** | Select the best approach and plan validation |
59+
| **7. Track Actions** | Document tasks, owners, and follow-ups |
60+
61+
### Step Details
1762

1863
**1. Gather Context**
1964
- Understand what's happening vs. what should happen
@@ -50,32 +95,16 @@ When issues arise, the `/debug` command provides a structured 7-step methodology
5095
- Set timelines and follow-up actions
5196
- Plan monitoring and communication
5297

53-
### What You Get
54-
55-
**Structured Methodology**
56-
- Prevents random debugging attempts
57-
- Ensures comprehensive problem analysis
58-
- Maintains focus on root causes
59-
60-
**Evidence-Based Analysis**
61-
- Backed by logs, tests, and reproduction steps
62-
- Clear documentation of findings
63-
- Traceable decision-making process
64-
65-
**Balanced Solutions**
66-
- Multiple resolution options with trade-offs
67-
- Risk assessment for each approach
68-
- Clear implementation guidance
98+
## Use Cases
6999

70-
**Actionable Plans**
71-
- Specific tasks with owners and timelines
72-
- Validation criteria and success metrics
73-
- Follow-up monitoring and communication
100+
- **Bug Fixes** — Resolve unexpected behavior or errors
101+
- **Integration Issues** — Troubleshoot system interactions
102+
- **Performance Problems** — Analyze and fix slowdowns
103+
- **Security Concerns** — Investigate and resolve vulnerabilities
104+
- **Validation** — Verify fixes before deployment
74105

75-
### Use Cases
106+
## Next Steps
76107

77-
- **Bug Fixes** - Resolve unexpected behavior or errors
78-
- **Integration Issues** - Troubleshoot system interactions
79-
- **Performance Problems** - Analyze and fix slowdowns
80-
- **Security Concerns** - Investigate and resolve vulnerabilities
81-
- **Validation** - Verify fixes before deployment
108+
- **Understand code first** — See [Understanding Existing Code](/docs/understand-existing-code-with-ai-devkit)
109+
- **Prevent bugs** — Use [/code-review](/docs/development-with-ai-devkit#code-review) before committing
110+
- **Remember solutions** — Save fixes to [Memory](/docs/memory) so you don't repeat mistakes

0 commit comments

Comments
 (0)