PHPackages                             chabiselx/debuggertools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. chabiselx/debuggertools

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

chabiselx/debuggertools
=======================

Create a log for understand algorithm

0.4.3(1y ago)0107PHPPHP ^7 || ^8

Since Mar 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/chaBiselx/DebuggerTools)[ Packagist](https://packagist.org/packages/chabiselx/debuggertools)[ RSS](/packages/chabiselx-debuggertools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (99)Used By (0)

DebuggerTools
=============

[](#debuggertools)

[![Latest Version](https://camo.githubusercontent.com/991b49cd9a5db4527af92fc1112c87f9e6fb9994100f03b9ebaf6442a782619a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f636861426973656c782f4465627567676572546f6f6c733f6c6162656c3d76657273696f6e26736f72743d73656d766572)](https://github.com/chaBiselx/DebuggerTools/releases)[![License](https://camo.githubusercontent.com/62f3c36502b04331e45185c4c6d9abce7376a000462aadf7108c5366d0e73081/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636861426973656c782f4465627567676572546f6f6c73)](https://github.com/chaBiselx/DebuggerTools/blob/main/LICENSE)

Description
-----------

[](#description)

**DebuggerTools** is a toolkit for developers, designed to facilitate debugging of PHP applications. It offers a set of classes to capture and analyze various aspects of your code execution, including:

- **Logger**: To log messages, errors, and various information.
- **Time Monitor**: To measure and log the execution time of code segments.
- **Memory Monitor**: To measure memory consumption of code segments.
- **Trace**: To trace function calls and follow code execution with fine granularity.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Run Docker for Development](#docker)
- [Testing](#Test)
- [Usage](#usage)
    - [ArrayOfOption](#ArrayOfOption)
    - [Logger](#logger)
    - [Time Monitor](#time-monitor)
    - [Memory Monitor](#memory-monitor)
    - [Trace](#trace)
- [Contribute](#contribute)
- [License](#license)

Installation
------------

[](#installation)

Install DebuggerTools using Composer:

```
composer require --dev chabiselx/debuggerTools
```

Or clone the repository directly:

```
git clone https://github.com/chaBiselx/DebuggerTools.git
cd DebuggerTools
composer install
```

Run Docker for Development
--------------------------

[](#run-docker-for-development)

Create the `.env.local` file at the project root.

Edit the ports in `.env.local.env` according to other Docker images:

- PHP\_EXT\_PORT\_1
- PHP\_EXT\_PORT\_2
- BDD\_EXT\_PORT

Run Docker for the first time:

```
make docker-build
```

To debug the build if needed:

```
docker-compose build --no-cache 2>&1 | tee build_logs.txt
```

Access the PHP container:

```
docker exec -it debuggertools-php7_3-1 bash
```

Testing
-------

[](#testing)

### Outside a container:

[](#outside-a-container)

```
make docker-test
```

### Inside a container:

[](#inside-a-container)

To run all tests:

```
make test
```

To run a specific test:

```
make test FILTER=file::function
```

Usage
-----

[](#usage)

### ArrayOfOption

[](#arrayofoption)

The `ArrayOfOption` parameter is an optional list. The possible fields are:

All:

- `hidePrefix` \[boolean\]: Hide the date at the beginning of the string (default: false)
- `showPrefix` \[boolean\]: Show the date at the beginning of the string (default: true)
- `purgeFileBefore` \[boolean\]: Purge the file before writing (default: false)
- `expendObject` \[boolean\]: Expand for better visibility of arrays in the log file (default: false)
- `fileName` \[string\]: Write to the file with the given name (default: log)

For the MemoryMonitor class:

- `activeConvertion` \[boolean\]: Enable unit-to-byte conversion (default: true)
- `disactiveConvertion` \[boolean\]: Disable unit-to-byte conversion (default: false)

### Logger

[](#logger)

To capture logs in your application:

```
use DebuggerTools\Logger;

$logger = new Logger($ArrayOfOption);
$logger->logger($dataToLog);
```

Via singleton:

```
\Debuggertools\Logger::loggerStatic($dataToLog, $ArrayOfOption);
```

### Time Monitor

[](#time-monitor)

To measure the execution time of a code section:

```
use DebuggerTools\TimeMonitor;

$time = new TimeMonitor($ArrayOfOption);
$time->set("label");
sleep(5);
$time->log("label");
```

### Memory Monitor

[](#memory-monitor)

To monitor the memory used by your application:

```
use DebuggerTools\MemoryMonitor;

$memoryMonitor = new MemoryMonitor($ArrayOfOption);
$memoryMonitor->logMemoryUsage('label');
//function
$memoryMonitor->logMemoryUsage('label');
```

### Trace

[](#trace)

To trace code execution:

```
use DebuggerTools\Trace;

$trace = new Trace($ArrayOfOption);
$trace->logTrace();
```

Via singleton:

```
\Debuggertools\Trace::getTraceStatic($ArrayOfOption);
```

Contribute
----------

[](#contribute)

Contributions are welcome! If you want to contribute:

1. Fork the repository.
2. Create a branch for your changes (`git checkout -b feature/new-feature`).
3. Commit your changes (`git commit -m 'Add a new feature'`).
4. Push the branch (`git push origin feature/new-feature`).
5. Open a Pull Request.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](https://github.com/chaBiselx/DebuggerTools/blob/main/LICENSE) file for details.

TODO
----

[](#todo)

- Improve the README
- Test Doctrine\\ORM\\PersistentCollection
- Middleware for all input/output
- EventListener for Symfony
- Fix SonarLint error (pathLog: getRootPath)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

97

Last Release

577d ago

PHP version history (3 changes)0.1.1PHP ^7.4 || ^8.0

0.2.4PHP ^7.3 || ^8.0

0.2.5PHP ^7 || ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/be95170a56d8322f1ea082478fc3d41be1278cbc7c9cb0a33d3e8abda09c94cb?d=identicon)[chaBiselx](/maintainers/chaBiselx)

---

Top Contributors

[![CharlesBiselx](https://avatars.githubusercontent.com/u/213029684?v=4)](https://github.com/CharlesBiselx "CharlesBiselx (144 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chabiselx-debuggertools/health.svg)

```
[![Health](https://phpackages.com/badges/chabiselx-debuggertools/health.svg)](https://phpackages.com/packages/chabiselx-debuggertools)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
