Jump24 - Laravel Developers that Click into Place. Never outsourced. Never offshored. Always exceptional.

PHP Debugger: A Lightweight Xdebug Alternative Built for Speed

Last updated on by

PHP Debugger: A Lightweight Xdebug Alternative Built for Speed image

PHP Debugger is a new PHP extension forked from Xdebug that removes everything except step debugging — no profiler, no code coverage, no tracing. The goal is a drop-in replacement that carries far less overhead when the debugger is loaded but not actively in use.

Near-Zero Idle Overhead

Benchmarks using Valgrind instruction counting (run in GitHub Actions across PHP 8.2–8.5) show the overhead when the extension is loaded with no IDE connected:

Benchmark Xdebug PHP Debugger
bench.php (synthetic) +661.6% +12.9%
Rector (processing a file) +124.5% +3.6%
Symfony request +35.3% +1.3%

Drop-In Xdebug Replacement

PHP Debugger accepts both php_debugger.* and xdebug.* INI prefixes, so existing configurations work without changes:

; Your existing Xdebug config works as-is:
xdebug.mode = debug
xdebug.client_host = 127.0.0.1
xdebug.client_port = 9003
xdebug.start_with_request = trigger
 
; Or use the new prefix:
php_debugger.mode = debug
php_debugger.client_host = 127.0.0.1
php_debugger.client_port = 9003
php_debugger.start_with_request = trigger

The extension also reports true for extension_loaded("xdebug"), which means packages that check for Xdebug at runtime will continue to work. PhpStorm and VS Code both work without any configuration changes.

Debug-Only Focus

By removing profiling, tracing, and code coverage, the extension stays focused on one use case: setting breakpoints and stepping through code.

Feature PHP Debugger Xdebug
Step debugging (DBGp) Yes Yes
xdebug_break() Works Works
XDEBUG_SESSION trigger Works Works
Code coverage No (use pcov) Yes
Profiling Removed Yes
Tracing Removed Yes

If you need code coverage, the project recommends pcov as a separate extension.

New PHP Debugger-Specific API

Alongside full Xdebug compatibility, the extension exposes its own function names and triggers as optional alternatives:

// Xdebug-compatible (still works):
xdebug_break();
 
// PHP Debugger equivalents:
php_debugger_break();
php_debugger_info();
php_debugger_connect_to_client();
php_debugger_is_debugger_active();
php_debugger_notify();

Session triggers follow the same pattern. XDEBUG_SESSION, XDEBUG_SESSION_START, and XDEBUG_TRIGGER all work, and the new PHP_DEBUGGER_SESSION, PHP_DEBUGGER_SESSION_START, and PHP_DEBUGGER_TRIGGER equivalents are available as well.

Installation

Binaries are available on the releases page. After downloading the right binary for your PHP version, add the extension to your php.ini:

zend_extension=php_debugger.so

The project is also an interesting case study in AI-assisted development. According to the README, the entire extension — fork, strip, optimize, rename — was built in days using PhpStorm, Claude Code, and OpenClaw.

You can get started with this extension on GitHub.

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Acquaint Softtech

Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

Visit Acquaint Softtech
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
PHP Debugger: A Lightweight Xdebug Alternative Built for Speed image

PHP Debugger: A Lightweight Xdebug Alternative Built for Speed

Read article
Laravel USPS: A Modern Wrapper for the USPS API image

Laravel USPS: A Modern Wrapper for the USPS API

Read article
Debugbar releases v4.2.0 and add a new Boost skill image

Debugbar releases v4.2.0 and add a new Boost skill

Read article
New Expressive Model Attributes in Laravel 13.2.0 image

New Expressive Model Attributes in Laravel 13.2.0

Read article
Inertia.js v3.0.0 Is Here with Optimistic Updates, useHttp, and More image

Inertia.js v3.0.0 Is Here with Optimistic Updates, useHttp, and More

Read article
Laravel Boost v2.4.0 Adds Security Audits and a Laravel Best Practices Skill image

Laravel Boost v2.4.0 Adds Security Audits and a Laravel Best Practices Skill

Read article