logocomune / debug
simple debugging tool which prints human-readable information about a variable.
Installs: 90
Dependents: 0
Suggesters: 1
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/logocomune/debug
Requires
- php: >=5.3.3
- symfony/var-dumper: *
This package is not auto-updated.
Last update: 2020-08-21 19:59:47 UTC
README
This software is a simple debugging tool which prints human-readable information about a variable in HTML or pure text if the execution is from CLI mode.
Install
Install the latest version with composer require logocomune/debug
Alternatively, you can specify Debug as a dependency in your project’s existing composer.json file:
{ "require-dev": { "logocomune/debug": "~1.1" } }
Usage
Basic example:
// debug() or d() just display a variable debug(['test'=>1,'d'=>'ok']); // debug and exit de(['test'=>1,'d'=>'ok']);
Available features:
// Disable debug \Logocomune\Debug\Debug::disable(); // Enable backtrace \Logocomune\Debug::backtrace(); // Disable backtrace \Logocomune\Debug::backtraceOff(); // Dump a variable with // print_r (default mode) \Logocomune\Debug::renderAsPrintR(); // var_dump \Logocomune\Debug::renderAsVarDump(); // var_export \Logocomune\Debug::renderAsVarExport(); // Symfony mechanism for exploring and dumping PHP variables \Logocomune\Debug::renderAsSymVarDump();