1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 13:28:35 +01:00
Barry vd. Heuvel 8241f4015a Make isString configurable
The current `is_string` is really if it is a string, but rather that it should or shouldn't be prettified. With this tweak we can force the prettify behaviour (for example, multi-line logs or json_encode data is much more readable when prettified)
2014-03-23 21:27:44 +01:00
2014-01-16 21:41:41 +00:00
2014-03-22 16:12:18 -04:00
2014-03-23 21:27:44 +01:00
2014-01-16 21:41:41 +00:00
2014-01-18 16:28:19 +00:00
2013-12-17 12:46:59 +01:00
2014-03-22 16:03:08 -04:00
2013-06-13 18:49:55 +08:00
2013-06-08 01:32:10 +07:00
2014-03-13 22:55:01 +01:00

PHP Debug Bar

Latest Stable Version Build Status

Displays a debug bar in the browser with information from php. No more var_dump() in your code!

Screenshot

Features:

  • Generic debug bar
  • Easy to integrate with any project
  • Clean, fast and easy to use interface
  • Handles AJAX request
  • Includes generic data collectors and collectors for well known libraries
  • The client side bar is 100% coded in javascript
  • Easily create your own collectors and their associated view in the bar
  • Save and re-open previous requests
  • Very well documented

Includes collectors for:

Checkout the demo for examples and phpdebugbar.com for a live example.

Integrations with other frameworks:

(drop me a message or submit a PR to add your DebugBar related project here)

Installation

The best way to install DebugBar is using Composer with the following requirement:

{
    "require": {
        "maximebf/debugbar": ">=1.0.0"
    }
}

If you are cloning the repository, you'll need to run composer install.

Quick start

DebugBar is very easy to use and you can add it to any of your projects in no time. The easiest way is using the render() functions

<?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>

The DebugBar uses DataCollectors to collect data from your PHP code. Some of them are automated but others are manual. Use the DebugBar like an array where keys are the collector names. In our previous example, we add a message to the MessagesCollector:

$debugbar["messages"]->addMessage("hello world!");

StandardDebugBar activates the following collectors:

  • MemoryCollector (memory)
  • MessagesCollector (messages)
  • PhpInfoCollector (php)
  • RequestDataCollector (request)
  • TimeDataCollector (time)
  • ExceptionsCollector (exceptions)

Learn more about DebugBar in the docs.

Description
No description provided
Readme MIT 30 MiB
Languages
PHP 67.9%
JavaScript 23.2%
CSS 8.7%
HTML 0.2%