maximebf/debugbar
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
psr/log | 3.0.0 | 6.77 kB | MIT | prod | |
symfony/var-dumper | v7.0.7 | - | MIT | prod |
The maximebf/debugbar is an ingenious PHP tool that enhances web development by displaying a debug bar in the browser with vital information directly from PHP. It's a convenient tool, eliminating the need for 'var_dump()' in your code, thereby improving the debugging process. The debug bar offers a clean, fast, and user-friendly interface, with the ability to handle AJAX requests. Furthermore, it supports several generic data collectors and their associated view in the bar, along with collectors for prominent libraries. The tool is both flexible and expandable as you can easily create custom collectors. For instance, it includes collectors for PDO, CacheCache, Doctrine, Monolog, Propel, Slim, Symfony Mailer, Swift Mailer, and Twig among others.
Using the maximebf/debugbar is straightforward. It integrates seamlessly with any PHP project, and the easiest way to use it is through the render()
function. First, you need to install it using Composer with the command: composer require maximebf/debugbar
. Once installed, you can use it in your PHP code. An example use case is as follows:
<?php
// Require the Composer autoloader, if not already loaded
require 'vendor/autoload.php';
use DebugBar\StandardDebugBar;
$debugbar = new StandardDebugBar();
$debugbarRenderer = $debugbar->getJavascriptRenderer();
$debugbar["messages"]->addMessage("hello world!");
?>
<html>
<head>
<?php echo $debugbarRenderer->renderHead() ?>
</head>
<body>
...
<?php echo $debugbarRenderer->render() ?>
</body>
</html>
Here, we have used the MessagesCollector
to add a message to the DebugBar. The StandardDebugBar
t also includes other collectors, such as MemoryCollector
, PhpInfoCollector
,RequestDataCollector
, TimeDataCollector
, and ExceptionsCollector
.
The comprehensive documentation for maximebf/debugbar can be found here. It includes detailed guidelines about how to get the most out of this powerful tool, elaborating on its rich features and capabilities. Here, you can grasp everything, from the basic integration and quick start guide to creating your own collector and advanced usage of the tool. With great explanatory content and illustrative examples, navigating the API has never been easier. The documentation helps provide accurate and updัo-the-minute information, ready to assist in optimizing your use of the maximebf/debugbar.