Xdebug is a PHP extension that provides debugging, profiling and diagnostic tools for developers. It helps identify errors, investigate application behaviour and analyse performance problems in PHP code.
The extension integrates with development environments such as PhpStorm and Visual Studio Code, allowing developers to step through scripts, inspect variables and follow execution paths. It also provides tools for analysing function calls, memory usage and test coverage.
Xdebug can be used when developing web applications or command-line scripts. Its individual capabilities can be enabled as needed, allowing developers to concentrate on a particular debugging or performance analysis task.
This is free and open source software.
Key Features
- Interactive step debugging through IDEs and editors supporting the DBGp protocol, including PhpStorm and Visual Studio Code.
- Set breakpoints, step through code, inspect variables and evaluate expressions while an application executes.
- Enhanced error reporting with detailed stack traces showing function calls, arguments, file names and line numbers.
- Improves PHP’s var_dump() function with formatted output for arrays, objects and nested data structures.
- Record function calls, arguments, return values and variable assignments to trace application execution.
- Profile PHP applications to identify performance bottlenecks and excessive memory consumption, with output compatible with KCacheGrind and QCacheGrind.
- Generate trace data for CPU-time and memory-usage flame graphs, which can be visualised using external tools.
- Collect code coverage information, including executed lines, branch coverage and path coverage, for use with testing frameworks such as PHPUnit.
- Analyse garbage collection activity through dedicated statistics.
- Detect excessive recursion and provide diagnostic information about execution and memory usage.
- Activate debugging, tracing and profiling selectively using request triggers or environment variables.
- Supports remote debugging, allowing PHP applications running on a server to communicate with a developer’s local IDE.
- Provides a command-line debugging client for interactive debugging without a graphical IDE.
- Cross-platform support – runs on Linux, macOS, and Windows.
Website: github.com/xdebug/xdebug
Support:
Developer: Derick Rethans
License: Xdebug License v1.03
Xdebug is written in PHP and C. Learn PHP with our recommended free books and free tutorials. Learn C with our recommended free books and free tutorials.
Related Software
| Debuggers | |
|---|---|
| LLDB | Next generation, high-performance debugger |
| Ghidra | Software reverse engineering framework |
| Delve | Source level debugger for the Go programming language |
| GDB | The GNU Debugger |
| Valgrind | A memory debugger and profiler |
| Radare2 | Portable reversing framework |
| BugStalker | Rust debugger |
| Xdebug | Extension for PHP to aid debugging and development |
| Seer | GUI frontend to GDB |
| iaito | Graphical interface for radare2 |
| KDbg | Graphical user interface to GDB |
| strace | Diagnostic, debugging and instructional userspace utility |
| rr | Record-and-replay debugger |
| gf | Lightweight GDB interface with source, stack and memory views |
| drgn | Programmable debugger that puts scripting at the centre |
| cgdb | Lightweight console frontend to the GNU debugger |
| PuDB | Console-based visual debugger for Python |
| nnd | Partially inspired by RemedyBG |
| bashdb | Source-code debugger for bash; follows the GDB command syntax |
| PINCE | Memory scanning, process manipulation and reverse engineering |
| edb | Low-level debugging with disassembly and register inspection |
| Sysprof | Profile an application or entire system |
| crash | Linux kernel crash analysis utility |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.