PHPackages                             abbadon1334/atk4-phpdebugbar - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. abbadon1334/atk4-phpdebugbar

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

abbadon1334/atk4-phpdebugbar
============================

ATK4 UI with PHPDebugBar

1.0.0(6y ago)3411[1 issues](https://github.com/abbadon1334/atk4-phpdebugbar/issues)[17 PRs](https://github.com/abbadon1334/atk4-phpdebugbar/pulls)MITPHPPHP &gt;=7.2.0

Since Jul 4Pushed 8mo agoCompare

[ Source](https://github.com/abbadon1334/atk4-phpdebugbar)[ Packagist](https://packagist.org/packages/abbadon1334/atk4-phpdebugbar)[ RSS](/packages/abbadon1334-atk4-phpdebugbar/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (13)Versions (23)Used By (0)

[![Build Status](https://camo.githubusercontent.com/d0555eb967a91e7960ecc67a80b12ae2fb42161d6f9b65a3221ade86a1bd3fbe/68747470733a2f2f7472617669732d63692e6f72672f61626261646f6e313333342f61746b342d70687064656275676261722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/abbadon1334/atk4-fastroute)[![Codacy Badge](https://camo.githubusercontent.com/f4604d303739a06af1e89efeefae554a128140d1fd42e9ba19d2d52dd01cca2a/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3735376464356135363739343464346539376363303066396334613433376232)](https://www.codacy.com/app/abbadon1334/atk4-phpdebugbar?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/atk4-phpdebugbar&utm_campaign=Badge_Grade)[![Codacy Badge](https://camo.githubusercontent.com/486c67171e91d2aae6f9e6935a64b939ae60b1b8e1e235bfa676136cdbf93285/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3735376464356135363739343464346539376363303066396334613433376232)](https://www.codacy.com/app/abbadon1334/atk4-phpdebugbar?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/atk4-phpdebugbar&utm_campaign=Badge_Coverage)[![Test Coverage](https://camo.githubusercontent.com/5179a048ca40dcbc1a5decdd33c5fbdd0ca63364893c5bbc9f660d9fa5fec469/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f33313561663532306639653834323066643337332f746573745f636f766572616765)](https://codeclimate.com/github/abbadon1334/atk4-phpdebugbar/test_coverage)[![Maintainability](https://camo.githubusercontent.com/6f382f7def13d6737fb1b6bbc3acfa6a7c41c7e7e26e03fffa52577f55aa15ac/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f33313561663532306639653834323066643337332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/abbadon1334/atk4-phpdebugbar/maintainability)

atk4-phpdebugbar
================

[](#atk4-phpdebugbar)

ATK4 With PHPDebugBar

#### First step :

[](#first-step-)

install via composer : `composer require abbadon1334/atk4-phpdebugbar`

#### Use it in ATK

[](#use-it-in-atk)

add to atk4\\ui\\App, just after initLayout :

```
$debugBar = $app->add(
    new ATK4PHPDebugBar\DebugBar()
)
```

#### Configure ATKDebugBar - Assets loading

[](#configure-atkdebugbar---assets-loading)

PHPDebugBar needs to load his own assets (JS and CSS), you need to set the correct relative url :

```
$debugBar->setAssetsResourcesUrl('http://localhost/test');
/*
this will load :

 #CSS
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/styles/github.css
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.css
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.css
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/openhandler.css

 #JS
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/highlight.pack.js
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.js
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/widgets.js
 - http://localhost/test/vendor/maximebf/debugbar/src/DebugBar/Resources/openhandler.js
*/
```

##### Configure phpdebugbar resource assets loading :

[](#configure-phpdebugbar-resource-assets-loading-)

the asset url is composed by 3 parts : relative,

example :

- resource url = `http://localhost/test`
- resource path = `/vendor/maximebf/debugbar/src/DebugBar/Resources`
- debugbar path = `/vendor/font-awesome/css/font-awesome.min.css`

resource url and resource path can be defined with methods :

- `setAssetsResourcesUrl(string $url)`
- `setAssetsResourcesPath(string $path)`

Example if you use routing :

you have to define a route that serve PHPDebugBar assets :

```
$debugBar->setAssetsResourcesUrl('/');
$debugBar->setAssetsResourcesPath('debugbar/');

/*
this will load :
 - /debugbar/vendor/font-awesome/css/font-awesome.min.css
 - /debugbar/openhandler.js
*/

```

##### Adding Collectors

[](#adding-collectors)

For general documentation, look in the really complete documentation of phpdebugbar :

#### Adding default Collectors

[](#adding-default-collectors)

Add default collectors : `$debugbar->addDefaultCollectors()`OR `$debugbar->addCollector(DebugBar\DataCollector\DataCollectorInterface $collector)`

#### ATK4 Logger Collector

[](#atk4-logger-collector)

if there is an already defined LoggerInterface in the app it will act as a proxy.

add it in this way : `$debugBar->addATK4LoggerCollector()`

To interact with the logger :

- if your App implements `DebugTrait` any calls to `LoggerInterface` methods

    example : `$app->info('test msg')`
- if your App implements or not `DebugTrait` , you can call it this way : `$app->getDebugBarCollector('atk4-logger')->info('test');` or any other LoggerInterface methods

#### ATK4 Persistence\\SQL Collector

[](#atk4-persistencesql-collector)

- added in this way `$debugBar->addATK4PersistenceSQLCollector();`, it will add logging to $this-&gt;app-&gt;db ( $app-&gt;db must exists ).
- added in this way `$debugBar->addATK4PersistenceSQLCollector($persistence);`, it will add logging to $persistence that must be instance of Persistence\\SQL.

No interaction excepted, just add logs to PHPDebugBar of every call to PDO made by Persistence\\SQL

#### Helpers

[](#helpers)

on Init, ATK4PHPDebugBar will add 3 dynamic methods to AppScope :

- `getDebugBar() : \DebugBar\DebugBar`

    return object `\DebugBar\DebugBar`
- `getDebugBarCollector($collector_name) : DebugBar\DataCollector\DataCollectorInterface`

    shorthand to `\DebugBar\DebugBar::getCollector`
- `hasDebugBarCollector($collector_name) : bool;`

    shorthand to `\DebugBar\DebugBar::hasCollector`

### TODO...

[](#todo)

Add Unit Test and more examples

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 90.3% 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

Unknown

Total

1

Last Release

2509d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54f3bc6465a0f20b47cc7cd7bfe00f607bf80b9de41d5d35fa6740f4b6b3f6c9?d=identicon)[abbadon1334](/maintainers/abbadon1334)

---

Top Contributors

[![abbadon1334](https://avatars.githubusercontent.com/u/5801824?v=4)](https://github.com/abbadon1334 "abbadon1334 (65 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (7 commits)")

---

Tags

agileatk4debugphpdebugbar

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/abbadon1334-atk4-phpdebugbar/health.svg)

```
[![Health](https://phpackages.com/badges/abbadon1334-atk4-phpdebugbar/health.svg)](https://phpackages.com/packages/abbadon1334-atk4-phpdebugbar)
```

###  Alternatives

[snowair/phalcon-debugbar

Integrates PHP Debug Bar with Phalcon.

160123.3k1](/packages/snowair-phalcon-debugbar)[yusukezzz/slim-debugbar

4213.5k](/packages/yusukezzz-slim-debugbar)

PHPackages © 2026

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