Skip to content

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.

ray

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:

TypeWhat it shows
LogText logging
CustomCustom data dumps
CallerCall origin (file, line, function)
CarbonCarbon date/time objects
TraceFull stack trace
ExceptionException with stack trace
TableStructured data as a table
MeasurePerformance timing
QuerySQL query with bindings
EloquentEloquent model data
Application LogApplication log entries
ViewTemplate rendering info
EventApplication events
JobQueue job details
LockLock status
MailableLaravel Mail preview
NotifyNotification data
OriginCall 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-config
php artisan ray:publish-config

Set env variables:

dotenv
RAY_HOST=ray@127.0.0.1
RAY_PORT=8000
RAY_HOST=ray@127.0.0.1
RAY_PORT=8000

In 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,
];

Other languages