spatie/laravel-ray
Send Laravel debug output to Ray, Spatie’s desktop debugging app. Use a consistent API to inspect variables, arrays, HTML, queries and more, measure performance, and pause execution. Works across Laravel/PHP with Ray’s rich UI.
Debugging & Developer Experience (DX):
dd(), Log::debug(), IDE logs). This reduces context-switching and improves developer productivity.Observability for Non-Production Environments:
dd()/var_dump() are insufficient.Onboarding & Training:
ray($variable) instead of mixed Log::/dd() calls).Performance Profiling:
Security & Compliance:
dd(), Log::debug(), IDE logs, or external tools).dd() breaks execution flow.dd()) and can justify the free trial → paid license cost (~$50–$100/year).dd()/var_dump() for quick checks."Laravel-Ray integrates Ray, a desktop debugging tool, into our Laravel apps to cut debugging time by 30–50% by replacing fragmented tools (logs,
dd(), IDEs) with a unified, real-time interface. This reduces developer frustration, speeds up feature delivery, and aligns with our goal of improving DX. The free tier covers most use cases, with a low-cost license (~$50/year) to unlock full features. Competitors like Sentry or Datadog are overkill for local/staging debugging and don’t offer the same developer ergonomics. Pilot this in QA to measure impact on dev velocity."
Key Metrics to Track:
*"Ray gives us superpowers for Laravel debugging:
- Replace
dd()/Log::debug()withray($variable)—rich output for arrays, queries, HTML, and even Blade templates.- Inspect database queries in real-time with context (bindings, execution time).
- Profile performance with
@measuredirectives (no need for Blackfire in most cases).- Debug queues/jobs without breaking execution flow.
- Works locally (no remote logging risks) and integrates with our existing Laravel stack.
Setup is trivial (10-minute
composer require+ config), and the free tier covers 90% of use cases. The paid license unlocks unlimited messages and team collaboration features. Let’s pilot it in [Project X] to compare against our currentdd()/Log::workflow."*
Why This Over Alternatives:
| Tool | Pros | Cons | Fit for Ray |
|---|---|---|---|
dd()/var_dump() |
Simple, no setup | Breaks execution, no context | ❌ Too primitive |
| Laravel Telescope | Great for production logs | Overkill for local debugging | ❌ Not real-time/rich |
| Xdebug | Powerful profiling | Steep learning curve | ❌ Complex for ad-hoc debugging |
| Sentry | Production error tracking | Not for local debugging | ❌ Wrong use case |
| Ray | Real-time, rich, cross-language | Paid after free tier | ✅ Best for Laravel DX |
Action Items:
ray() vs. current workflow.ray() vs. dd()/Log::debug() (5-minute cheat sheet).How can I help you explore Laravel packages today?