Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pollen-solutions/debug

Pollen Solutions - Debug Component - Collection of debugging tools
https://github.com/pollen-solutions/debug

debug php

Last synced: 6 days ago
JSON representation

Pollen Solutions - Debug Component - Collection of debugging tools

Awesome Lists containing this project

README

        

# Debug Component

[![Latest Version](https://img.shields.io/badge/release-1.0.0-blue?style=for-the-badge)](https://www.presstify.com/pollen-solutions/debug/)
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)](LICENSE.md)
[![PHP Supported Versions](https://img.shields.io/badge/PHP->=7.4-8892BF?style=for-the-badge&logo=php)](https://www.php.net/supported-versions.php)

Pollen Solutions **Debug** Component provides a collection of tools dedicated to debugging.

## Installation

```bash
composer require pollen-solutions/debug
```

## Basic Usage

### ErrorHandler

```php
use Pollen\Debug\DebugManager;

// DebugManager instantiation
$debug = new DebugManager();

// ErrorHandler activation
$debug->errorHandler()->enable();

// ErrorHandler test
function errorHandlerTest()
{
throw new InvalidArgumentException('Test de Whoops');
}
errorHandlerTest();
```

### DebugBar

```php
use Pollen\Debug\DebugManager;

// DebugManager instantiation
$debug = new DebugManager();

// DebugBar activation
$debug->debugBar()->enable();

// DebugBar test
echo <<< HTML


Debug Bar Test
HTML;

// DebugBar head assets
echo $debug->debugBar()->renderHead();

echo <<< HTML

HTML;

// DebugBar render
echo $debug->debugBar()->render();

echo <<< HTML

HTML;
exit;
```