PHP debugging and analysis tools using Xdebug. Use when asked to trace, debug, profile, or analyze coverage of PHP code.
/plugin marketplace add koriym/xdebug-mcp/plugin install xdebug@xdebug-mcpThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Non-invasive PHP debugging and analysis tools. No var_dump() or code modification needed.
Tools are installed globally via composer. Use absolute paths:
| Tool | Path |
|---|---|
| xtrace | ~/.composer/vendor/bin/xtrace |
| xstep | ~/.composer/vendor/bin/xstep |
| xprofile | ~/.composer/vendor/bin/xprofile |
| xcoverage | ~/.composer/vendor/bin/xcoverage |
| xback | ~/.composer/vendor/bin/xback |
| User Request | Tool |
|---|---|
| Trace, execution flow, show function calls | xtrace |
| Step debugging, breakpoints, inspect variables, track variable changes | xstep |
| Profile, performance, bottlenecks, slow code | xprofile |
| Coverage, test coverage, which lines tested | xcoverage |
| Backtrace, call stack, how did we get here | xback |
The word "trace" can mean different things:
xtrace (records execution from start to finish)xback (shows call stack at a point)xstep (interactive with breakpoints)Trace execution forward from start to finish. Captures complete execution flow, function calls, parameters, and timing data.
~/.composer/vendor/bin/xtrace [--json] [--context=TEXT] [--include-vendor=PATTERNS] -- command
~/.composer/vendor/bin/xtrace --context="Debug login" -- php login.php
~/.composer/vendor/bin/xtrace --context="Test analysis" -- vendor/bin/phpunit tests/UserTest.php
~/.composer/vendor/bin/xtrace --include-vendor="bear/*" -- php app.php
Stop at breakpoint, step forward N times, record variable changes at each step. See how variable values affect branching ("this variable was X, so it went into this branch").
~/.composer/vendor/bin/xstep --break=file.php:line --steps=N [--context=TEXT] -- command
--break=file.php:line - Single breakpoint location--break=file.php:line:condition - Conditional (e.g., $user==null)--steps=N - Step forward N times from breakpoint# Step 20 times from line 42
~/.composer/vendor/bin/xstep --break="user.php:42" --steps=20 --context="Track auth" -- php user.php
# Conditional breakpoint
~/.composer/vendor/bin/xstep --break="user.php:15:\$id==null" --steps=10 -- php user.php
Identify performance bottlenecks with precision data.
~/.composer/vendor/bin/xprofile [--json] [--context=TEXT] [--include-vendor=PATTERNS] -- command
~/.composer/vendor/bin/xprofile --context="Optimize processing" -- php process.php
~/.composer/vendor/bin/xprofile --json -- php script.php
~/.composer/vendor/bin/xprofile --include-vendor="doctrine/*" -- php app.php
Collect code coverage data for PHPUnit or any PHP script.
~/.composer/vendor/bin/xcoverage # Auto-detect PHPUnit
~/.composer/vendor/bin/xcoverage -- php script.php # Any PHP script
~/.composer/vendor/bin/xcoverage --branch-coverage -- php app.php # Branch coverage
~/.composer/vendor/bin/xcoverage
~/.composer/vendor/bin/xcoverage --include-vendor=bear/resource,ray/di
~/.composer/vendor/bin/xcoverage --branch-coverage -- php app.php
Get stack trace at specific line without interactive debugging.
~/.composer/vendor/bin/xback [--break=SPEC] [--depth=N] [--context=TEXT] -- command
~/.composer/vendor/bin/xback -- php script.php # First line
~/.composer/vendor/bin/xback --break=app.php:50 -- php app.php # At breakpoint
~/.composer/vendor/bin/xback --depth=20 -- php main.php # Deep trace
| Option | Description |
|---|---|
--json | AI-optimized JSON output |
--context=TEXT | Add description for AI analysis |
--include-vendor=PATTERNS | Include vendor packages |
By default, vendor code is excluded to focus on your code. Use --include-vendor when needed:
--include-vendor=bear/* # Include specific framework
--include-vendor=bear/*,ray/di # Multiple packages
--include-vendor=*/* # Include all vendor (framework debugging)
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.