Skip to content

Ray Integration

Debug with Spatie Ray and LaraDumps directly in Laradebug.

Overview

Laradebug includes a built-in Ray server that receives debug output from:

Setup

1. Install Ray in Your Project

bash
composer require spatie/laravel-ray --dev

2. Configure Ray Port

Ensure your project's Ray config matches Laradebug's port:

php
// config/ray.php
return [
    'port' => 23517,  // Default Laradebug port
];

Or set via environment:

env
RAY_PORT=23517

3. Start the Debugger

The Ray server starts automatically with Laradebug. Check the status:

  • Green indicator: Server running
  • Settings: Laradebug → Settings → Ray Port

Using Ray

Basic Usage

php
ray('Hello from Tinker!');
ray($user);
ray($users->toArray());

LaraDumps Support

LaraDumps works similarly:

bash
composer require laradumps/laradumps --dev
php
ds('Debug with LaraDumps');
ds($user)->label('User');
ds()->table($data);

Server Configuration

Changing the Port

If port 23517 is in use:

  1. Open Settings (Cmd + ,)
  2. Go to Ray settings
  3. Change the port
  4. Update your Laravel config to match

Auto-Start

The Ray server starts automatically by default. Disable in:

Settings → Ray → Auto-start

Grace Period

After code execution, Laradebug waits for late-arriving Ray events:

Settings → General → Debugger Grace Period

Default: 5 seconds. Increase if you have async operations.

Built for Laravel developers.