程序调试
- 作者仓库星标 36
- 许可证 MIT
- 作者仓库 everything-react-native-expo
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @JubaKitiashvili · MIT
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# /erne-debug — Systematic Diagnosis
You are executing the `/erne-debug` command. Use the **performance-profiler** agent for systematic bug diagnosis.
## Process
### Step 1: Reproduce
Define exact reproduction steps:
1. Starting state
2. Actions taken
3. Expected behavior
4. Actual behavior
5. Environment (device, OS, Expo SDK version)
### Step 2: Classify the Bug
| Category | Indicators | First Check |
|----------|-----------|-------------|
| **Crash** | App terminates | Check Metro logs, Hermes stack trace |
| **Render** | Visual glitch, wrong layout | Check component tree, re-render count |
| **State** | Wrong data displayed | Check Zustand store, TanStack Query cache |
| **Navigation** | Wrong screen, broken back | Check Expo Router history, params |
| **Performance** | Jank, slow response | Check FPS, bundle size, memory |
| **Network** | Failed API calls | Check request/response, auth tokens |
| **Native** | Platform-specific issue | Check native logs (Xcode/Logcat) |
### Step 3: Investigate
**JavaScript layer:**
```bash
# Check Metro bundler logs
# Search for errors/warnings in console output
# Add strategic console.log at suspected points
```
**React layer:**
- Component re-render tracking (React DevTools)
- Props/state inspection
- Effect dependency analysis
**Native layer (if agent-device available):**
- Screenshot current state
- Navigate through repro steps visually
- Capture native crash logs
### Step 4: Fix & Verify
1. Identify root cause
2. Implement minimal fix
3. Verify fix resolves the issue
4. Check for regression (run related tests)
5. Document what caused it and why
## Output
```
## Bug Report
### Summary
[One-line description]
### Root Cause
[Technical explanation]
### Fix Applied
[Files changed with explanation]
### Verification
[Steps taken to verify fix]
[Test results]
```
章节与文件索引
按说明文件中的顺序排列。
第 1 步:重现
第 2 步:对 Bug 进行分类
第 3 步:调查
第 4 步:修复并验证
文件/命令 -> /erne-debug · request/response · Xcode/Logcat · errors/warnings · Props/state
内容校验值 -> 32ed861dc28e
当前原文的自动摘译,尚未人工审校。
第 1 步:重现
定义准确的再现步骤: 起始状态 采取的操作 预期行为 实际行为
第 2 步:对 Bug 进行分类
类别·指标·首次检查崩溃·应用程序终止·检查Metro日志,Hermes堆栈跟踪渲染·视觉故障,错误布局·检查组件树,重新渲染计数状态·显示的数据错误·检查Zustand存储,TanStack查询缓存导航·屏幕错误,损坏·检查Expo路由器历史记录,参数
第 3 步:调查
JavaScript层:React层:组件重新渲染跟踪(React DevTools) Props/状态检查 效果依赖分析
第 4 步:修复并验证
确定根本原因 实施最小修复 验证修复是否解决了问题 检查回归(运行相关测试) 记录导致问题的原因和原因