For years I've been juggling var_dump(), Xdebug setups, and paying for tools like Spatie Ray ($49/year) just to see what my PHP app is doing. None of it felt right — either it broke the page, needed heavy IDE integration, or cost money for something that should be free.
So I built DebugPHP.
What it does
DebugPHP streams your debug output to a browser-based dashboard in real-time via Server-Sent Events. No page reloads. No desktop apps. No config hell. Just call Debug::send() and watch it appear.
use DebugPHP\Debug;
Debug::init('your-session-token');
Debug::send('User created!');
Debug::send($user, 'User')->color('blue');
Debug::send($exception, 'Error')->color('red');
Why not just use Xdebug or Ray?
| dd() / var_dump() | Xdebug | Spatie Ray | DebugPHP | |
|---|---|---|---|---|
| Real-time output | ❌ | ❌ | ✅ | ✅ |
| No page disruption | ❌ | ✅ | ✅ | ✅ |
| Zero config | ❌ | ❌ | ❌ | ✅ |
| Browser-based | ❌ | ❌ | ❌ | ✅ |
| Free & open source | ✅ | ✅ | ❌ | ✅ |
| No dependencies | ✅ | ❌ | ❌ | ✅ |
Current features
Labels & Colors — categorize your entries visually:
Debug::send($query, 'SQL')->color('blue');
Debug::send($error, 'Error')->color('red');
Timers — measure performance inline:
Debug::startTimer('db-query');
$results = $db->query('SELECT * FROM users');
Debug::stopTimer('db-query');
// → Dashboard shows: "db-query: 23.4ms"
Toolbar Metrics — live key-value chips in the topbar, perfect for request-level data:
Debug::metric('Template', 'home.php');
Debug::metric('Memory', memory_get_usage(true) / 1024 / 1024 . 'MB');
Metrics auto-disappear from the toolbar when you remove them from your code — no stale data.
Tables — render arrays as proper tables:
Debug::table([
['name' => 'Leon', 'role' => 'Developer'],
['name' => 'Sarah', 'role' => 'Designer'],
]);
Pause / Resume / Clear — full control without touching your app.
Self-hostable
Don't want your debug data leaving your machine? The server component is fully open source too:
git clone https://github.com/CallMeLeon167/debugphp-server.git
cd debugphp-server
composer install
# Open /setup/ in the browser — the wizard does the rest
Then just point the client at your own server:
Debug::init('your-token', [
'host' => 'http://localhost:8080',
]);
Technical details (for those who care)
-
PHP 8.1+ required, zero runtime dependencies (just
ext-curl) - PHPStan Level 10 — the strictest static analysis level, fully passing
- SSE-based push architecture — no WebSocket server needed, works on any standard Apache/nginx setup
- Data is serialized with PHP's native
serialize()+ base64 for full type fidelity (objects, exceptions, nested structures all work) - Session tokens tie your app to your dashboard tab — multiple sessions work in parallel
Installation
composer require callmeleon167/debugphp --dev
Requires PHP 8.1+ and ext-curl. That's it.
Status
Currently in pre-release — the core is working and the dashboard is functional, but I'm still polishing things before the public launch on GitHub.
If this sounds useful to you: feel free to open issues or drop feedback here. I'm especially curious whether the self-hosted setup flow works smoothly on different environments.
Built by a PHP dev, for PHP devs. MIT licensed.
Top comments (2)
Sounds interesting but I can't see the repo from github.com/CallMeLeon167.
Hey, thanks for the heads up! The repo is still set to private — I'm planning to make it public right before the official launch. I'll drop a note here once it's live so you can check it out. 🙂