Debug Mode Agent
Runs a four-phase debugging workflow: reproduces the bug first, traces the root cause, applies a minimal fix, then verifies with tests instead of guessing at a patch.
Overview
Debug Mode turns Copilot into a structured debugging assistant instead of one that jumps straight to a patch. It works through four phases: assessing the problem, investigating the root cause, applying a fix and verifying it, refusing to move to the next phase until the current one holds up.
How it works
- It reads the error messages and stack traces first, then reproduces the bug before touching any code, documenting expected versus actual behavior.
- It traces the execution path, checks recent git history for the change that likely introduced the bug, and ranks hypotheses by likelihood before picking one to test.
- It makes a targeted, minimal change instead of a broad rewrite, weighing edge cases and side effects along the way.
- Finally, it reruns the original reproduction steps plus the wider test suite, then reports the root cause and any preventive changes.
Examples
"Debug why the checkout API returns a 500 only when the cart has
more than 10 items."
Installation
You need VS Code with the GitHub Copilot extension.
- Create the agents folder and download the file into your repo:
mkdir -p .github/agents curl -o .github/agents/debug.agent.md \ https://raw.githubusercontent.com/github/awesome-copilot/main/agents/debug.agent.md - Reload VS Code, or open a new Copilot Chat; custom agents under
.github/agents/are picked up automatically. - Pick this agent from the mode picker in Copilot Chat and describe a bug to confirm it reproduces it before proposing a fix.
Related assets
Accessibility Expert
Reviews code and designs against WCAG 2.1/2.2, covering semantics, keyboard and focus behavior, forms, media and dynamic SPA updates, and ships framework-specific examples plus a CI setup for automated checks.
Address Comments Agent
Works through pull request review comments one at a time: applies the minimal fix for each, pushes back on comments that don't make sense, adds test coverage, and commits with a descriptive message before moving to the next comment.
ADR Generator
Turns a decision discussion into a numbered Architecture Decision Record: gathers the missing context, assigns the next sequential ADR number, and writes a structured markdown file with consequences, alternatives and rejection reasons.