Diagnose and fix bugs using an evidence-based investigation. Requires collecting runtime evidence before making fixes—never guess from code alone. Covers hypothesis-driven debugging, runtime instrumentation and structured logging, Lua error and stack-trace analysis, taint issues and combat lockdown, and API failures or deprecations (e.g., Midnight 12.0 preparation). Triggers: error, bug, debug, fix, crash, taint, nil value, diagnose, hypothesis, runtime, evidence, instrumentation.
Systematic debugging and error recovery for WoW addons.
MANDATORY: ALWAYS use MCP tools directly instead of the shell.
| Task | MCP Tool |
|------|----------|
| Get All Output | addon.output(agent_mode=true) |
| Lint Addon | addon.lint(addon="MyAddon") |
| Scan Deprecations | addon.deprecations(addon="MyAddon") |
| Queue Lua Eval | lua.queue(code=["GetMoney()"]) |
| Get Eval Results | lua.results() |
| Request type | Load reference | |--------------|----------------| | Evidence-based debugging, hypothesis-driven | references/evidence-based-debugging.md | | Lua errors, nil values | references/error-patterns.md | | Debug workflow, isolation | references/debugging-strategies.md | | Error tracking (BugGrabber) | ../../docs/integration/errors.md | | Troubleshooting guide | ../../docs/integration/troubleshooting.md | | Structured logging | ../../docs/integration/console.md | | Frame inspection | ../../docs/integration/inspect.md |
CRITICAL: Use
MechanicLib:Log()instead ofprint()for all debug output.
| Feature | print() | MechanicLib:Log() |
|---------|-----------|---------------------|
| Agent access | ❌ Requires screenshot | ✅ addon.output retrieves directly |
| Filtering | ❌ None | ✅ Source + category filters |
| Copyable | ❌ No | ✅ Yes, via Console export |
-- ✅ Correct: Agent can see this in addon.output
local MechanicLib = LibStub("MechanicLib-1.0", true)
if MechanicLib then
MechanicLib:Log("MyAddon", "Debug: value=" .. tostring(val), MechanicLib.Categories.CORE)
end
-- ❌ Avoid: Spams chat, requires screenshot
print("[MyAddon] Debug: value=" .. tostring(val))
Ask user to /reload and confirm, then:
addon.output(agent_mode=true)
attempt to index nil value: API returned nil, check if unit exists or data is loaded.Action blocked by Blizzard: You tried to call a protected function in combat.Interface action failed: Taint has spread to a secure UI component./reload, wait for confirmation, then addon.output(agent_mode=true)/reload and confirm, then verify with addon.output.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer