xdebug

Analyze PHP execution with Xdebug 3.x for tracing, debugging, profiling, and coverage.

54|9|Updated Aug 16, 2025
One-click install
npx skills add https://github.com/koriym/xdebug-mcp --skill xdebug
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xdebug
Source: https://github.com/koriym/xdebug-mcp/tree/main/skills/xdebug
Command: npx skills add https://github.com/koriym/xdebug-mcp --skill xdebug

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PHP debugging and analysis tools using Xdebug. Use when asked to trace, debug, profile, or analyze coverage of PHP code.

Core Features & Use Cases

  • Non-invasive debugging and runtime analysis without altering source code.
  • Forward tracing with xtrace, step debugging with xstep, and profiling with xprofile.
  • Coverage and backtrace tooling via xcoverage and xback for comprehensive code insights.

Quick Start

Install and run the tools via the provided CLI binaries to begin debugging a PHP script.

Frequently Asked Questions about xdebug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug and trace PHP execution without modifying source code?

PHP tracing and debugging without modifying source code is achieved through non-invasive runtime analysis using Xdebug. The tool provides forward tracing, step-through debugging, profiling, and coverage analysis to diagnose bugs and performance issues across PHP projects.

Can I profile PHP performance and generate code coverage reports with Xdebug?

Yes, PHP performance profiling and code coverage analysis are supported via dedicated tooling. The xprofile command handles performance profiling, while xcoverage generates comprehensive code coverage reports to identify untested execution paths.

Do I need a specific PHP version to use Xdebug tracing and step debugging?

Xdebug tracing and step debugging require Xdebug version 3.x and PHP 8.1 or higher. These environment prerequisites ensure compatibility with the forward tracing, step debugging, and profiling commands provided by the toolset.

What is the best way to analyze PHP backtraces and forward execution traces?

Analyzing PHP backtraces and forward execution traces is best handled through dedicated commands: xback for backtrace analysis and xtrace for forward tracing. Both operate non-invasively to diagnose runtime behavior without altering code.

How do I start step-by-step debugging for a PHP script using Xdebug?

Step-by-step PHP debugging is initiated by running the provided CLI binaries to start debugging a PHP script. The xstep command enables step-through debugging, allowing you to isolate bugs and analyze execution flow systematically.