Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ray Laravel Package

spatie/ray

Send debug output from any PHP app to Ray, Spatie’s desktop debugging tool. Inspect arrays, HTML, queries, and more with a consistent API across Laravel/PHP/JS. Measure performance, pause execution, and keep fast, interactive feedback.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Debugging & Developer Experience (DX) Enhancement:

    • Adopt Ray to replace or augment existing debugging tools (e.g., dd(), Log::debug(), or third-party IDE debuggers) for faster, richer debugging in Laravel/PHP applications.
    • Enable cross-language debugging (PHP + JavaScript) via a unified UI, reducing context-switching for full-stack teams.
  • Roadmap: Observability & Performance:

    • Integrate performance profiling (e.g., tracking slow queries, API calls) into CI/CD pipelines or staging environments to identify bottlenecks pre-production.
    • Use Ray’s "trace" feature to log and analyze complex workflows (e.g., payment processing, multi-step form submissions) without cluttering logs.
  • Build vs. Buy:

    • Buy: Ray is a mature, maintained solution with active development (1.48+ releases in 2026) and enterprise-grade features (e.g., clipboard copying, query analysis). Avoid reinventing debugging tools.
    • Customize: Extend Ray’s functionality via hooks (e.g., afterSendCallbacks) to integrate with internal monitoring tools (e.g., Datadog, Sentry) or add custom metadata.
  • Use Cases:

    • Debugging Complex State: Visualize nested arrays, Eloquent models, or API responses with expandable/collapsible views (e.g., debugging a Cart with 50+ items).
    • Livewire/Alpine.js Debugging: Inspect frontend state changes in real-time alongside backend logic.
    • Query Optimization: Identify N+1 queries or slow joins via SQL query logging with execution time metrics.
    • Error Reproduction: Capture exact request/response cycles (headers, payloads) for support tickets or post-mortems.
    • AI/ML Debugging: Send Markdown-formatted outputs (e.g., model predictions, validation errors) to Ray for analysis.

When to Consider This Package

Adopt Ray If:

  • Your team prioritizes developer velocity and spends >20% of time debugging Laravel/PHP code.
  • You need real-time debugging without IDE breakpoints (e.g., debugging in production-like staging or serverless environments).
  • Your stack includes multiple languages/frameworks (e.g., Laravel + Vue/React) and you want a unified debugging experience.
  • You’re using Livewire, Alpine.js, or Inertia.js and need to debug frontend-backend interactions seamlessly.
  • Your current debugging tools (e.g., dd(), Log::debug()) are cluttering logs or lack interactive features (e.g., copying data, expanding objects).
  • You’re investing in observability and want to reduce toil in diagnosing performance issues (e.g., slow queries, external API calls).

Look Elsewhere If:

  • Your team prefers IDE-based debugging (Xdebug, PHPStorm) and doesn’t need remote/non-blocking debugging.
  • You’re constrained by budget (Ray requires a paid license for full features; free tier is limited to 20 messages/session).
  • Your application is extremely simple (e.g., CRUD apps with minimal state) and dd() suffices.
  • You’re already using a dedicated APM tool (e.g., New Relic, Blackfire) that covers debugging + performance profiling.
  • Your PHP environment blocks external connections (Ray requires outbound HTTP to myray.app).

How to Pitch It (Stakeholders)

For Executives (Business/Tech Leads):

"Ray transforms how our engineers debug Laravel applications—replacing slow, fragmented tools with a single pane of glass for real-time debugging. Here’s why it’s a no-brainer:

  • Saves 30–50% debugging time: Engineers can inspect complex data structures (e.g., nested API responses, query results) without breakpoints or log parsing.
  • Reduces production incidents: Capture exact request/response cycles for support tickets, cutting resolution time by 40%.
  • Unifies full-stack debugging: Developers debug PHP and JavaScript in the same tool, reducing context-switching.
  • Future-proofs observability: Integrates with CI/CD for proactive performance monitoring (e.g., flagging slow queries before they hit production).
  • Low risk: Free tier covers most use cases; paid license is only needed for scaling beyond 20 messages/session.

Investment: ~$100/year for a team license (vs. lost dev hours from current tools). ROI: Faster releases, fewer bugs, happier engineers."*


For Engineering Teams:

"Ray is the Swiss Army knife for Laravel debugging—here’s how it upgrades your workflow:

  • Replace dd() and Log::debug(): Send anything to Ray (variables, queries, HTML, Markdown) with one line:
    ray(new User)->with('orders')->with('profile');
    
  • Interactive debugging: Expand/collapse objects, copy data to clipboard, or pause execution mid-flow.
  • Query analysis: Log SQL queries with execution time and bindings—no more guessing why a query is slow.
  • Livewire/Alpine support: Debug frontend state changes in sync with backend logic.
  • Performance profiling: Use ray()->trace() to log timed sections of code (e.g., payment processing):
    ray()->trace('Payment Processing', fn() => $payment->charge());
    
  • AI-friendly: Send formatted outputs (e.g., validation errors, model dumps) to Ray for analysis.

Getting Started:

  1. Install: composer require spatie/ray.
  2. Run php artisan vendor:publish --provider="Spatie\Ray\RayServiceProvider".
  3. Start Ray’s desktop app and connect to your project.

Pro Tip: Use ray()->ignore() to exclude sensitive data (e.g., passwords) from logs."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport