mohamed-hathout / debugger
A powerful Laravel debugging tool with real-time monitoring, query debugging, and variable inspection capabilities
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
pkg:composer/mohamed-hathout/debugger
Requires
- php: ^8.3
- laravel/framework: ^12.19
- livewire/livewire: ^3.0
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.0
- phpunit/phpunit: ^10.0
README
A powerful debugging tool for Laravel applications that allows you to monitor and analyze debug data in real-time with advanced filtering and visualization capabilities.
Requirements
- PHP ^8.3
- Laravel ^12.19
Installation
composer require mohamed_hathout/debugger
Configuration
After installation, publish the configuration file:
php artisan vendor:publish --provider="MohamedHathout\Debugger\DebuggerServiceProvider"
This will publish:
- Configuration file (
config/debugger.php) - Views (optional)
Usage
Basic Debugging
// Debug any variable debug($variable); // Debug an Eloquent query debug_query($query);
Configuration Options
In config/debugger.php:
return [ 'truncate_tables' => false, // Whether to use TRUNCATE instead of DELETE when clearing data 'sort' => 'desc', // Sort order for debug entries 'route_name' => 'debugger', // URL path for the debug viewer 'is_enabled' => true, // Enable/disable debugging 'storage_type' => 'database', // 'database' or 'cache' 'cache' => [ 'key_prefix' => 'debugger:', 'counter_key' => 'debugger:counter', 'index_key' => 'debugger:index', 'files_key' => 'debugger:files', 'ttl' => 3600, // Cache TTL in seconds ], ];
Debug Viewer
Access the debug viewer at /debugger (or your configured route) to see all debug entries with:
- Real-time updates
- Type filtering (text, number, JSON)
- File filtering
- Search functionality
- Copy to clipboard
- Clear all data
Features
- Debug any variable type (text, numbers, arrays, objects)
- Query debugging with bindings resolution
- Real-time debug viewer with Livewire
- Advanced filtering and search
- Database or cache storage options
- Configurable settings
- Bootstrap 5 UI with dark mode support
License
The MIT License (MIT).