Ray — Debug Tool
Ray by Spatie is a popular debug tool, especially in the Laravel ecosystem. Buggregator is a free, self-hosted alternative — you get the same ray() calls, but the data lands in Buggregator alongside your exceptions, logs, emails, and profiling. One place for everything.
Use cases
- Free Ray alternative — no license needed. Same
ray()function, same workflow. - Multi-language debugging — Ray has SDKs for PHP, JavaScript, Ruby, Go, and Bash. All output goes to Buggregator.
- Laravel debugging — dump Eloquent models, SQL queries, jobs, mail, events, and more with type-specific rendering.
- All debug data in one UI — don't switch between Ray app, Sentry, log files, and Mailhog. It's all in Buggregator.
Supported payload types
Buggregator renders 18 Ray payload types:
| Type | What it shows |
|---|---|
| Log | Text logging |
| Custom | Custom data dumps |
| Caller | Call origin (file, line, function) |
| Carbon | Carbon date/time objects |
| Trace | Full stack trace |
| Exception | Exception with stack trace |
| Table | Structured data as a table |
| Measure | Performance timing |
| Query | SQL query with bindings |
| Eloquent | Eloquent model data |
| Application Log | Application log entries |
| View | Template rendering info |
| Event | Application events |
| Job | Queue job details |
| Lock | Lock status |
| Mailable | Laravel Mail preview |
| Notify | Notification data |
| Origin | Call origin info |
Each payload shows its origin (file, line, function). Click file paths to open in your IDE.
Configuration
Laravel
Publish the Ray config:
bash
php artisan ray:publish-configphp artisan ray:publish-configSet env variables:
dotenv
RAY_HOST=ray@127.0.0.1
RAY_PORT=8000RAY_HOST=ray@127.0.0.1
RAY_PORT=8000In Docker Compose:
RAY_HOST=ray@buggregator,RAY_PORT=8000.
PHP (any framework)
Create a ray.php file in your project root:
php
<?php
return [
'enable' => true,
'host' => 'ray@127.0.0.1',
'port' => 8000,
'remote_path' => null,
'local_path' => null,
'always_send_raw_values' => false,
];<?php
return [
'enable' => true,
'host' => 'ray@127.0.0.1',
'port' => 8000,
'remote_path' => null,
'local_path' => null,
'always_send_raw_values' => false,
];