Skip to content

An improvement a day keeps the doctor away

License

Notifications You must be signed in to change notification settings

bartgloudemans/debug-toolbar

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debug-toolbar

An improvement a day keeps the doctor away

Install

Via composer:

composer require --dev "alsvanzelf/debugtoolbar:dev-master"

Usage

  • Copy demo/dist/ to a directory in your own application and serve it via the web.
  • Copy demo/debug-display.php to a directory in your own application and serve it via the web.
  • Setup a logger (i.e. Monolog) storing the results in a database.
  • Adjust your application's page rendering in between rendering and sending it to the browser:
    • to track data of the request: $logId = Log::track($logger),
    • and add the toggler to the rendered body: (new Toggler($logId))->render().
  • Optionally pass a $scriptUrl and $displayUrl to the Toggler's constructor with the urls of the dist directory and debug-display.php copied before.
  • Adjust the debug-display.php to fetch the data from the database used by the logger.
  • When using PDO: call PDOPart::trackExecutedStatement($statement, $binds) after executing a PDO statement.
  • When using Twig: setup it's profiler and call TwigPart::trackProfiler($profiler).

About

An improvement a day keeps the doctor away

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 80.6%
  • HTML 19.4%