Imported from anoblet/copilot (
.github/skills/debugmcp/SKILL.md). Install upstream withnpx skills add anoblet/copilot --skill debugmcp. Copyright stays with the author.
DebugMCP
Use this skill when the fastest path to root cause is a live debugger with breakpoints, stepping, runtime state inspection, or expression evaluation.
Good Fit
- Reproducing a bug that depends on runtime values, control flow, async timing, or test state.
- Confirming why a function returns the wrong value or why an exception is thrown.
- Comparing expected and actual state at a precise execution point.
- Debugging a specific test, script, application entry point, or integration boundary.
Weak Fit
- Purely static tasks such as formatting, refactors with no behavior change, or documentation updates.
- Failures that are already explained by diagnostics, logs, or a clear compile error.
- Environments where the host cannot start or control a debug session.
Default Workflow
- Confirm that a live debugger is warranted and static inspection is not enough.
- Read the host's debugging instructions or guide before starting a session.
- Verify the exact target file, working directory, and if relevant the specific test or launch configuration.
- Start one debug session and place the smallest useful set of breakpoints near the suspected boundary.
- Step, inspect variables, and evaluate expressions until the root cause is confirmed.
- Clear breakpoints and stop or restart the session as needed.
Guardrails
- Do not assume exact tool names; hosts expose DebugMCP-equivalent capabilities differently.
- Keep one active debug session unless the host clearly supports more.
- Prefer narrow breakpoints at entry points, failure boundaries, or state transitions.
- Separate symptom collection from root-cause confirmation; inspect runtime state before editing code.
- Fall back to static analysis when debugger prerequisites are unavailable.
Examples
- A unit test fails only under certain inputs. Start a debug session for that test, pause at the assertion boundary, and inspect the state that produced the mismatch.
- A handler returns the wrong result. Break on the decision point, step through the branch, and evaluate the inputs that led there.
See the workflow reference for a practical debugging loop and the troubleshooting reference for prerequisite checks and recovery steps.