PHPackages                             4spacesdk/ci4debugtool - 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. 4spacesdk/ci4debugtool

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

4spacesdk/ci4debugtool
======================

Debug Tool for CodeIgniter 4

1.0.8(6y ago)417.9k—0%11MITPHPPHP &gt;=7.1

Since Dec 4Pushed 6y ago3 watchersCompare

[ Source](https://github.com/4spacesdk/CI4DebugTool)[ Packagist](https://packagist.org/packages/4spacesdk/ci4debugtool)[ RSS](/packages/4spacesdk-ci4debugtool/feed)WikiDiscussions master Synced today

READMEChangelog (9)DependenciesVersions (10)Used By (1)

CI4DebugTool
============

[](#ci4debugtool)

Debug tool for Code Igniter 4

Usage
-----

[](#usage)

Add a debug message `Data::debug("Some debug message");`Almost everything can be thrown to `Data::debug`; simple types, arrays, objects, Entities.

Or set a variable `Data::set("name", $someThing);`

Variable can be a simple type or an `Entity` of `OrmExtension`. `Data` will use `toArray` or `allToArray` on `Entity` if supplied by `OrmExtension`.

Use `Data::getStore()` to get the data and present it. Ex. In your base controller add this in the constructor

```
Data::set('bench', 0);
timer('code-start');
```

Create a method to print response. Ex

```
protected function success($code = 200) {
    $this->response->setStatusCode($code);
    Data::set('bench', timer()->getElapsedTime('code-start'));
    $this->response->setJSON(Data::getStore());
    $this->response->send();
}
```

This will give you a nice benchmark on every json response.

Live Template
-------------

[](#live-template)

For fast debugging, add this Live Template to your IDE: `Data::debug(get_class($this), "$END$");`.

Code Igniter 4 Error page
-------------------------

[](#code-igniter-4-error-page)

To see the debug data in Code Igniter 4 Error page follow these steps

### 1

[](#1)

Edit `app/Views/errors/html/error_exception.php` and add a tab for Data in the list with id `#tabs`.

```
Data
```

### 2

[](#2)

In the same file add this section under the div with class `.tab-content`.

```

```

### 3 Optional

[](#3-optional)

To top is all up. Go to `app/Views/errors/debug.js` and add this at the bottom of `init()`-function

```
// Show last selected tab
if(window.localStorage.getItem('lastTab')) {
    tabLinks[window.localStorage.getItem('lastTab')].click();
}
```

And add this to `showTab()`-function

```
window.localStorage.setItem("lastTab", selectedId);
```

This will remember the tab between page reload.

###  Health Score

34

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

Every ~41 days

Recently: every ~29 days

Total

9

Last Release

2331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe69fb07944c0214b954ea162404e65535585190ea0cf5bc9328d207bde8a13b?d=identicon)[4 Spaces](/maintainers/4%20Spaces)

---

Top Contributors

[![Martin-4Spaces](https://avatars.githubusercontent.com/u/9819124?v=4)](https://github.com/Martin-4Spaces "Martin-4Spaces (13 commits)")

### Embed Badge

![Health badge](/badges/4spacesdk-ci4debugtool/health.svg)

```
[![Health](https://phpackages.com/badges/4spacesdk-ci4debugtool/health.svg)](https://phpackages.com/packages/4spacesdk-ci4debugtool)
```

###  Alternatives

[filp/whoops

php error handling for cool kids

13.3k394.4M1.3k](/packages/filp-whoops)[symfony/stopwatch

Provides a way to profile code

2.8k379.8M774](/packages/symfony-stopwatch)[composer/xdebug-handler

Restarts a process without Xdebug.

2.6k390.6M73](/packages/composer-xdebug-handler)[beyondcode/laravel-dump-server

Symfony Var-Dump Server for Laravel

1.6k42.1M153](/packages/beyondcode-laravel-dump-server)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k253.2k13](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510143.5M56](/packages/spatie-ignition)

PHPackages © 2026

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