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 --dev2. 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=235173. 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 --devphp
ds('Debug with LaraDumps');
ds($user)->label('User');
ds()->table($data);Server Configuration
Changing the Port
If port 23517 is in use:
- Open Settings (
Cmd + ,) - Go to Ray settings
- Change the port
- Update your Laravel config to match
Auto-Start
The Ray server starts automatically by default. Disable in:
Settings → Ray → Auto-startGrace Period
After code execution, Laradebug waits for late-arriving Ray events:
Settings → General → Debugger Grace PeriodDefault: 5 seconds. Increase if you have async operations.
Related Features
- Code Execution — Run code that uses Ray
- SQL Logging — Alternative query debugging
- Log Tailing — Monitor Laravel logs