reproduce-bug

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Reproduce Bug Command

Bug重现命令

Look at github issue #$ARGUMENTS and read the issue description and comments.
查看GitHub Issue #$ARGUMENTS,阅读问题描述和评论。

Phase 1: Log Investigation

第一阶段:日志调查

Run the following agents in parallel to investigate the bug:
  1. Task rails-console-explorer(issue_description)
  2. Task appsignal-log-investigator(issue_description)
Think about the places it could go wrong looking at the codebase. Look for logging output we can look for.
Run the agents again to find any logs that could help us reproduce the bug.
Keep running these agents until you have a good idea of what is going on.
并行运行以下Agent来调查Bug:
  1. 执行任务 rails-console-explorer(issue_description)
  2. 执行任务 appsignal-log-investigator(issue_description)
结合代码库思考可能出错的地方,寻找可以查看的日志输出。
再次运行这些Agent,找到任何有助于重现Bug的日志。
持续运行这些Agent,直到你对问题情况有清晰的了解。

Phase 2: Visual Reproduction with Playwright

第二阶段:使用Playwright进行可视化重现

If the bug is UI-related or involves user flows, use Playwright to visually reproduce it:
如果Bug与UI相关或涉及用户流程,使用Playwright进行可视化重现:

Step 1: Verify Server is Running

步骤1:验证服务器是否运行

mcp__plugin_compound-engineering_pw__browser_navigate({ url: "http://localhost:3000" })
mcp__plugin_compound-engineering_pw__browser_snapshot({})
If server not running, inform user to start
bin/dev
.
mcp__plugin_compound-engineering_pw__browser_navigate({ url: "http://localhost:3000" })
mcp__plugin_compound-engineering_pw__browser_snapshot({})
如果服务器未运行,告知用户启动
bin/dev

Step 2: Navigate to Affected Area

步骤2:导航到受影响区域

Based on the issue description, navigate to the relevant page:
mcp__plugin_compound-engineering_pw__browser_navigate({ url: "http://localhost:3000/[affected_route]" })
mcp__plugin_compound-engineering_pw__browser_snapshot({})
根据问题描述,导航到相关页面:
mcp__plugin_compound-engineering_pw__browser_navigate({ url: "http://localhost:3000/[affected_route]" })
mcp__plugin_compound-engineering_pw__browser_snapshot({})

Step 3: Capture Screenshots

步骤3:捕获截图

Take screenshots at each step of reproducing the bug:
mcp__plugin_compound-engineering_pw__browser_take_screenshot({ filename: "bug-[issue]-step-1.png" })
在重现Bug的每个步骤中拍摄截图:
mcp__plugin_compound-engineering_pw__browser_take_screenshot({ filename: "bug-[issue]-step-1.png" })

Step 4: Follow User Flow

步骤4:遵循用户流程

Reproduce the exact steps from the issue:
  1. Read the issue's reproduction steps
  2. Execute each step using Playwright:
    • browser_click
      for clicking elements
    • browser_type
      for filling forms
    • browser_snapshot
      to see the current state
    • browser_take_screenshot
      to capture evidence
  3. Check for console errors:
    mcp__plugin_compound-engineering_pw__browser_console_messages({ level: "error" })
重现问题描述中的精确步骤:
  1. 阅读问题的重现步骤
  2. 使用Playwright执行每个步骤:
    • browser_click
      用于点击元素
    • browser_type
      用于填写表单
    • browser_snapshot
      查看当前状态
    • browser_take_screenshot
      捕获证据
  3. 检查控制台错误:
    mcp__plugin_compound-engineering_pw__browser_console_messages({ level: "error" })

Step 5: Capture Bug State

步骤5:捕获Bug状态

When you reproduce the bug:
  1. Take a screenshot of the bug state
  2. Capture console errors
  3. Document the exact steps that triggered it
mcp__plugin_compound-engineering_pw__browser_take_screenshot({ filename: "bug-[issue]-reproduced.png" })
当你重现Bug时:
  1. 拍摄Bug状态的截图
  2. 捕获控制台错误
  3. 记录触发Bug的精确步骤
mcp__plugin_compound-engineering_pw__browser_take_screenshot({ filename: "bug-[issue]-reproduced.png" })

Phase 3: Document Findings

第三阶段:记录调查结果

Reference Collection:
  • Document all research findings with specific file paths (e.g.,
    app/services/example_service.rb:42
    )
  • Include screenshots showing the bug reproduction
  • List console errors if any
  • Document the exact reproduction steps
资料收集清单:
  • 记录所有研究结果,包含具体文件路径(例如:
    app/services/example_service.rb:42
  • 附上显示Bug重现过程的截图
  • 列出所有控制台错误(如果有)
  • 记录精确的重现步骤

Phase 4: Report Back

第四阶段:反馈结果

Add a comment to the issue with:
  1. Findings - What you discovered about the cause
  2. Reproduction Steps - Exact steps to reproduce (verified)
  3. Screenshots - Visual evidence of the bug (upload captured screenshots)
  4. Relevant Code - File paths and line numbers
  5. Suggested Fix - If you have one
在Issue中添加评论,包含:
  1. 调查结果 - 关于Bug原因的发现
  2. 重现步骤 - 经过验证的精确重现步骤
  3. 截图 - Bug的可视化证据(上传捕获的截图)
  4. 相关代码 - 文件路径和行号
  5. 修复建议 - 如果有可行的方案