Mahmoud Al-HabashOpen to new projects
  • WorkWork
  • ServicesServices
  • LabLab
  • WritingWriting
  • ContactContact
Amman--:--عربي
Writing/Laravel

Laravel Debugging with dd and dump

Master debugging techniques with Laravel's helper functions.

16 January 20261 min readLaravelاقرأ بالعربية

On this page

  1. Basic Debugging
  2. Multiple Variables
  3. Query Debugging
  4. Log Queries
  5. Ray Integration

Debug effectively:

Basic Debugging

dd($variable); // Dump and die
dump($variable); // Dump and continue

Multiple Variables

dd($user, $posts, $comments);

Query Debugging

php
User::where('active', true)->dd();
User::where('active', true)->dump();

Log Queries

php
DB::enableQueryLog();
// Run queries
dd(DB::getQueryLog());

Ray Integration

ray($variable);
ray($user)->green();
ray()->measure();
All articles

Keep reading

  • Laravel Action Classes Pattern16 January 20261 min read
  • Laravel Action Classes: Single Responsibility16 January 20261 min read
  • Laravel API Rate Limiting16 January 20261 min read