Download the PHP package chabiselx/debuggertools without Composer
On this page you can find all versions of the php package chabiselx/debuggertools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chabiselx/debuggertools
More information about chabiselx/debuggertools
Files in chabiselx/debuggertools
Package debuggertools
Short Description Create a log for understand algorithm
License
Informations about the package debuggertools
DebuggerTools
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
- Installation
- Run Docker for Development
- Testing
- Usage
- ArrayOfOption
- Logger
- Time Monitor
- Memory Monitor
- Trace
- Contribute
- License
Installation
Install DebuggerTools using Composer:
Or clone the repository directly:
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:
To debug the build if needed:
Access the PHP container:
Testing
Outside a container:
Inside a container:
To run all tests:
To run a specific test:
Usage
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
To capture logs in your application:
Via singleton:
Time Monitor
To measure the execution time of a code section:
Memory Monitor
To monitor the memory used by your application:
Trace
To trace code execution:
Via singleton:
Contribute
Contributions are welcome! If you want to contribute:
- Fork the repository.
- Create a branch for your changes (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add a new feature'
). - Push the branch (
git push origin feature/new-feature
). - Open a Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
TODO
- Improve the README
- Test Doctrine\ORM\PersistentCollection
- Middleware for all input/output
- EventListener for Symfony
- Fix SonarLint error (pathLog: getRootPath)