Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

logocomune/debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Debug tool

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();

About

simple debugging tool which prints human-readable information about a variable in HTML or pure text if the execution is from CLI mode.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages