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%13MITPHPPHP &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 1mo ago

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

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

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

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

2380d 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

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M914](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k28](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

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