All Projects → buggregator → app

buggregator / app

Licence: MIT license
Buggregator is a beautiful, lightweight debug server build on Laravel that helps you catch your smpt, sentry, var-dump, monolog, ray outputs. It runs without installation on multiple platforms.

Programming Languages

PHP
23972 projects - #3 most used programming language
Vue
7211 projects
Blade
752 projects

Projects that are alternatives of or similar to app

Sentry
Sentry is cross-platform application monitoring, with a focus on error reporting.
Stars: ✭ 29,700 (+11367.18%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Telegram
Plugin for Sentry which allows sending notification via Telegram messenger.
Stars: ✭ 168 (-35.14%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Php
The official PHP SDK for Sentry (sentry.io)
Stars: ✭ 1,591 (+514.29%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Cocoa
The official Sentry SDK for iOS, tvOS, macOS, watchOS
Stars: ✭ 370 (+42.86%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Javascript
Official Sentry SDKs for JavaScript. We're hiring https://grnh.se/ca81c1701us
Stars: ✭ 6,012 (+2221.24%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Go
Official Sentry SDK for Go
Stars: ✭ 415 (+60.23%)
Mutual labels:  crash-reporting, error-monitoring, sentry
sentry-spark
Apache Spark Sentry Integration
Stars: ✭ 14 (-94.59%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Sentry Laravel
Laravel SDK for Sentry
Stars: ✭ 927 (+257.92%)
Mutual labels:  crash-reporting, error-monitoring, sentry
Raven.cr
Raven is a Crystal client for Sentry
Stars: ✭ 96 (-62.93%)
Mutual labels:  crash-reporting, error-monitoring, sentry
TrackJS-Node
TrackJS Error Monitoring agent for NodeJS
Stars: ✭ 26 (-89.96%)
Mutual labels:  debugger, error-monitoring
Raven Weapp
Sentry SDK for WeApp
Stars: ✭ 142 (-45.17%)
Mutual labels:  crash-reporting, sentry
elmah.io
ELMAH error logger for sending errors to elmah.io.
Stars: ✭ 31 (-88.03%)
Mutual labels:  crash-reporting, error-monitoring
Raven Python
Raven is the legacy Python client for Sentry (getsentry.com) — replaced by sentry-python
Stars: ✭ 1,677 (+547.49%)
Mutual labels:  crash-reporting, sentry
Bugsnag Go
Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
Stars: ✭ 155 (-40.15%)
Mutual labels:  crash-reporting, error-monitoring
Raygun4net
Raygun provider for .NET
Stars: ✭ 107 (-58.69%)
Mutual labels:  crash-reporting, error-monitoring
Exceptionless
Exceptionless server and jobs
Stars: ✭ 2,107 (+713.51%)
Mutual labels:  crash-reporting, error-monitoring
Ohbug
An open source application information monitoring platform.
Stars: ✭ 101 (-61%)
Mutual labels:  crash-reporting, error-monitoring
Bugsnag Cocoa
Bugsnag crash reporting for iOS, macOS and tvOS apps
Stars: ✭ 167 (-35.52%)
Mutual labels:  crash-reporting, error-monitoring
raygun4android
Android crash reporting provider for Raygun
Stars: ✭ 19 (-92.66%)
Mutual labels:  crash-reporting, error-monitoring
xr
Lightweight debug server utility for PHP.
Stars: ✭ 116 (-55.21%)
Mutual labels:  debugger, dump

A server for debugging PHP applications and more.

Support me on Patreon StyleCI build Downloads Twitter Join to our telegram

Frame 2

Buggregator is a beautiful, lightweight standalone server built on Laravel, VueJs and RoadRunner underhood, that helps debugging mostly PHP applications without extra packages. It runs without installation on multiple platforms via docker and supports symfony var-dumper, monolog, sentry, smtp, inspector and spatie ray package.

Contents

  1. Features
  2. Installation
  3. Configuration
  4. Contributing
  5. License

Buggregator

1. Symfony VarDumper server

The dump() and 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).

Installation

composer require --dev symfony/var-dumper

Settings

Env variables

// Laravel
VAR_DUMPER_FORMAT=server
VAR_DUMPER_SERVER=127.0.0.1:9912

// Plain PHP
$_SERVER['VAR_DUMPER_FORMAT'] = 'server';
$_SERVER['VAR_DUMPER_SERVER'] = '127.0.0.1:9912';

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.

Settings

Env variables

// Laravel
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025

// Symfony
MAILER_DSN=smtp://127.0.0.1:1025

3. Compatible with Sentry reports

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).

Laravel settings

Laravel is supported via a native package. You can read about integrations on official site

// DSN for the Buggregator
SENTRY_LARAVEL_DSN=http://[email protected]:23517/1

Other platforms

To report to Buggregator you’ll need to use a language-specific SDK. The Sentry team builds and maintains these for most popular languages. You can find out documentation on official site


4. Monolog server

Buggregator 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\SlackWebhookHandler or \Monolog\Handler\SocketHandler handler.

Laravel settings for SlackWebhookHandler

Env variables

LOG_CHANNEL=slack
LOG_SLACK_WEBHOOK_URL=http://127.0.0.1:23517/slack

Laravel settings for SocketHandler

Config

// config/logging.php
return [
    // ...
    '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'),
            ],
        ],
    ],
];

Env variables

LOG_CHANNEL=socket
LOG_SOCKET_URL=127.0.0.1:9913

Other PHP frameworks

Install monolog composer require monolog/monolog

<?php

use Monolog\Logger;
use Monolog\Handler\SocketHandler;
use Monolog\Formatter\JsonFormatter;

// create a log channel
$log = new Logger('buggregator');
$handler = new SocketHandler('127.0.0.1:9913');
$handler->setFormatter(new JsonFormatter());
$log->pushHandler($handler);

// Send records to the Buggregator
$log->warning('Foo');
$log->error('Bar');

5. Compatible with Inspector reports

Buggregator can be used to receive Inspector events from your application. Buggregator is a lightweight alternative for local development. Just configure Inspector client URL to send data to Buggregator. It can display dump output in the browser as well as in a terminal (console output).

Laravel settings

Laravel is supported via a native package. You can read about integrations on official site

INSPECTOR_URL=http://127.0.0.1:23517/inspector
INSPECTOR_API_KEY=test
INSPECTOR_INGESTION_KEY=1test
INSPECTOR_ENABLE=true

Other platforms

For PHP you can use inspector-apm/inspector-php package.

use Inspector\Inspector;
use Inspector\Configuration;

$configuration = new Configuration('YOUR_INGESTION_KEY');
$configuration->setUrl('http://127.0.0.1:23517/inspector');
$inspector = new Inspector($configuration);

// ...

To report to Buggregator you’ll need to use a language-specific SDK. The Inspector team builds and maintains these for most popular languages. You can find out documentation on official site


6. Spatie Ray debug tool

Buggregator is compatible with spatie/ray package. The Ray debug tool supports PHP, Ruby, JavaScript, TypeScript, NodeJS, Go and Bash applications. After installing one of the libraries, you can use the ray function to quickly dump stuff. Any variable(s) that you pass will be sent to the Buggregator. Buggregator can display dump output in the browser as well as in a terminal (console output).

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

Laravel settings

Please make sure ray.php config published to the project root.

You can run an artisan command to publish it in to the project root.

php artisan ray:publish-config

Env variables

RAY_HOST=127.0.0.1  # Ray server host
RAY_PORT=23517      # Ray server port

Framework agnostic PHP

In framework agnostic projects you can use this template as the ray config file.

<?php
// Save this in a file called "ray.php"

return [
    /*
    * This settings controls whether data should be sent to Ray.
    */
    'enable' => true,
    
    /*
     *  The host used to communicate with the Ray app.
     */
    'host' => '127.0.0.1',

    /*
     *  The port number used to communicate with the Ray app. 
     */
    'port' => 23517,
    
    /*
     *  Absolute base path for your sites or projects in Homestead, Vagrant, Docker, or another remote development server.
     */
    'remote_path' => null,
    
    /*
     *  Absolute base path for your sites or projects on your local computer where your IDE or code editor is running on. 
     */
    'local_path' => null,
    
    /*
     * When this setting is enabled, the package will not try to format values sent to Ray.
     */
    'always_send_raw_values' => false,
];

You can find out more information about installation and configuration on official site

UI

Buggregator has a responsive design and a mobile device can be used as an additional screen for viewing event history. Also you can use a termial to collect dump output if you don't want to use a browser.

Buggregator devices


Technological stack

Installation

Docker image

You can run Buggregator via docker from Docker Hub or using the provided Dockerfile

Just run one of bash command

Latest stable release

docker run --pull always -p 23517:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 butschster/buggregator:latest

Latest beta release

docker run --pull always -p 23517:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 butschster/buggregator:beta

You can omit --pull always argument if your docker-compose doesn't support it.

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

Using buggregator with docker compose

// docker-compose.yml
version: "2"
services:
    ...

    buggregator:
        image: butschster/buggregator:latest
        ports:
        - 23517:8000
        - 1025:1025
        - 9912:9912
        - 9913:9913

Authentication

By default Buggregator doesn't use any authentication, but you can enable it via ENV variables.

AUTH_ENABLED=true
AUTH_USERNAME=admin
AUTH_PASSWORD=secret

Example

docker run --pull always --env AUTH_ENABLED=true --env AUTH_USERNAME=admin --env AUTH_PASSWORD=secret -p 23517:8000 -p 1025:1025 -p 9912:9912 -p 9913:9913 butschster/buggregator:latest

or

// docker-compose.yml
version: "2"
services:
    ...

    buggregator:
        image: butschster/buggregator:latest
        ports:
        - 23517:8000
        - 1025:1025
        - 9912:9912
        - 9913:9913
        environment:
            AUTH_ENABLED: false
            AUTH_USERNAME: admin
            AUTH_PASSWORD: secret

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

Example

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

or

// docker-compose.yml
version: "2"
services:
    ...

    buggregator:
        image: butschster/buggregator:latest
        ports:
        - 23517:8000
        - 1025:1025
        - 9912:9912
        - 9913:9913
        environment:
            CLI_SMTP_STREAM: false
            CLI_RAY_STREAM: false

That's it. Now you open http://127.0.0.1:23517 url in your browser or open terminal and collect dump output from your application.

Enjoy!


Contributing

There are several projects in this repo with unresolved issues and it would be great if you help a community solving them.

Backend part

Server requirements

  1. PHP 8.0

Installation

  1. Clone repository git clone https://github.com/buggregator/app.git
  2. Run composer composer install
  3. Run migrations php artisan app:configure
  4. Download RoadRunner binary vendor/bin/rr get-binary
  5. Run RoadRunner server ./rr serve

Frontend part

Server requirements

  1. NodeJS
  2. IntertiaJS
  3. TailwindCSS

Installation

  1. Run npm npm i
  2. Build npm npm run watch - for development
  3. Build npm npm run prod - for production

Code samples

Code samples of configured Laravel application ready to send data to Buggregator you can find here.

Articles


License

Buggregator is open-sourced software licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].