omouren/external-var-dumper-bundle

Externalize Symfony VarDumper dumps

Installs: 47 363

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 2

Forks: 2

Open Issues: 1

Type:symfony-bundle

2.0.1 2024-09-06 13:37 UTC

This package is auto-updated.

Last update: 2025-03-06 14:36:44 UTC


README

SensioLabsInsight

The ExternalVarDumperBundle allows you to redirect Symfony dumps (VarDumper) to an external web service. Usefull to debug applications like REST APIs, background console commands or other applications that you don't have a direct output or that you can't break with a dump in the middle of the response.

Installation

Via Composer

$ composer require omouren/external-var-dumper-bundle

Register the bundle in the application kernel :

<?php
// app/AppKernel.php
// ...
public function registerBundles()
{
    $bundles = [
        // ...
        new Omouren\ExternalVarDumperBundle\OmourenExternalVarDumperBundle(),
        // ...
    ];
// ...

Add configuration (optional) :

# app/config/config.yml
debug:
    dump_destination: "tcp://dumper-viewer:8080"

omouren_external_var_dumper:
    enabled: true

Usage

<?php
// ...
dump($var);

VarDumper Viewer

Viewer in Vue.js to catch and see your dumps : external-var-dumper-viewer

With Pre-built Docker image

# By default, internaly server use port 8080
$ docker run --rm -p 80:8080 -ti omouren/external-var-dumper-viewer:latest
# You can override it with custom port by an environment variable
$ docker run --rm -e "PORT=1337" -p 80:1337 -ti omouren/external-var-dumper-viewer:latest
# Now go to http://localhost:80

Var Dumper Viewer