A server for debugging more than just Laravel applications.
Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app. It runs without installation on multiple platforms via docker and supports symfony var-dumper, monolog, sentry, smtp and spatie ray package.
dd() functions output its contents in the same browser window or console terminal as your own application. Sometimes mixing the real output with the debug output can be confusing. That’s why this Buggregator can be used to collect all the dumped data. Buggregator can display dump output in the browser as well as in a terminal (console output).
2. Fake SMTP server for catching mail
Buggregator also is an email testing tool that makes it super easy to install and configure a local email server (Like MailHog). Buggregator sets up a fake SMTP server and you can configure your preferred web applications to use Buggregator’s SMTP server to send and receive emails. For instance, you can configure a local WordPress site to use Buggregator for email deliveries.
MAIL_MAILER=smtp MAIL_HOST=127.0.0.1 MAIL_PORT=1025
3. Compatible with Sentry
Buggregator can be used to receive Sentry reports from your application. Buggregator is a lightweight alternative for local development. Just configure Sentry DSN to send data to Buggregator. It can display dump output in the browser as well as in a terminal (console output).
Buggregator can receive logs from
monolog/monolog package via
\Monolog\Handler\SocketHandler handler. Buggregator can display dump output in the browser as well as in a terminal (console output).
Buggregator is compatible with
Supported features: Simple data, Colors, Sizes, Labels, New screen, Clear all, Caller, Trace, Pause, Counter, Class name of an object, Measure, Json, Xml, Carbon, File, Table, Image, Html, Text, Notifications, Phpinfo, Exception, Show queries, Count queries, Show events, Show jobs, Show cache, Model, Show views, Markdown, Collections, Env, Response, Request, Ban, Charles, Remove, Hide/Show events, Application log, Show Http client requests, Mailable
Read more about
RAY_HOST=127.0.0.1 # Ray server host RAY_PORT=23517 # Ray server port
It is a free alternative of The Ray app for those who want to run a server without GUI, cannot afford the paid version or just like open source.
But it doesn’t mean you shouldn’t support spatie’s packages!
Buggregator has a responsive design and a mobile device can be used as an additional screen for viewing event history. Also you can user a termial to collect dump output if you don't want to use a browser.
Code samples of configured Laravel application ready to send data to Buggregator you can find here.
- A server for debugging more than just Laravel applications..
- Сервер для дебага Laravel приложений и не только.
Just run on bash command
docker run --pull always -p 23517:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 butschster/buggregator:latest # --pull always - optional option checks latest version on every running. You can omit it # or specific version docker run -p 23517:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 butschster/buggregator:v1.18 # You can omit unused ports if you use, for example, only var-dumper docker run --pull always -p 9912:9912 butschster/buggregator:latest
You can omit unused ports
If you don't want to see dump output in your terminal, you can disable it through ENV variables:
CLI_SMTP_STREAM=false CLI_VAR_DUMPER_STREAM=false CLI_SENTRY_STREAM=false CLI_RAY_STREAM=false CLI_MONOLOG_STREAM=false
docker run --pull always --env CLI_SMTP_STREAM=false --env CLI_SENTRY_STREAM=false -p 23517:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 butschster/buggregator:latest
// docker-compose.yml version: "2" services: debugger: image: butschster/buggregator:latest environment: DB_CONNECTION: pgsql DB_HOST: db DB_DATABASE: homestead DB_USERNAME: homestead DB_PASSWORD: secret ports: - 23517:8000 - 1025:1025 - 9912:9912 - 9913:9913
- Configure your .env for VarDumper
- Configure your .env for mail
MAIL_MAILER=smtp MAIL_HOST=127.0.0.1 MAIL_PORT=1025
- Configure your .env for Sentry package
- Configure your .env for Ray package
RAY_HOST=127.0.0.1 # Debugger host RAY_PORT=23517 # Debugger port
- Configure your .env for monolog logs
Add a new channel to config file
'channels' => [ ... 'socket' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), 'handler' => \Monolog\Handler\SocketHandler::class, 'formatter' => \Monolog\Formatter\JsonFormatter::class, 'handler_with' => [ 'connectionString' => env('LOG_SOCKET_URL', '127.0.0.1:9913'), ], ], ]
the set default channel to
That's it. Now you open http://127.0.0.1:23517 url in your browser or terminal and collect dump output from your application.
There are several projects in this repo with unresolved issues and it would be great if you help a community solving them.
- PHP 8.0
- Swoole 4.7
- Clone repository
- Run composer `composer install
- Run npm
- Run HTTP server
php artisan server:start --host=127.0.0.1 --port=23517
- Run SMTP server
php artisan smtp:start --host=127.0.0.1 --port=1025
- Run var-dumper server
php artisan dump-server:start --host=127.0.0.1 --port=9912
- Run monolog server
php artisan monolog:start --host=127.0.0.1 --port=9913
- Build npm
npm run prod
Buggregator is open-sourced software licensed under the MIT license.