PHPackages                             lightla/variable-debugger - 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. lightla/variable-debugger

ActiveLibrary

lightla/variable-debugger
=========================

A lightweight PHP variable debugger

v1.0.25(4mo ago)140↓16.7%MITPHPPHP ^8.2

Since Nov 26Pushed 4mo agoCompare

[ Source](https://github.com/lightla/variable-debugger)[ Packagist](https://packagist.org/packages/lightla/variable-debugger)[ RSS](/packages/lightla-variable-debugger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (10)Used By (0)

### FEATURE

[](#feature)

Web Light/Dark/NoColor pretty Theme:

- Tips: Open/hide array/object by toggle click at: `[addClassPropertiesFromPluginLaravel() # recommended
    ->addClassPropertiesFromPluginPDO() # recommended
    ->withShowExcludedCount(true) # recommended
    ->useTerminationExitSuccess(true) # recommended
    ;

# Config
$config = \lightla\VariableDebugger\VariableDebugConfig::builder()
    ->presetCompact(15, false)  # shortcut config for compact mode
    ->presetDetailed(15, false) # shortcut config for detailed mode
    ->useWebThemeDark()         # Default web: Dark
    ->useCliThemeNoColor()      # Default cli: NoColor
    ->useTerminationMode(VariableDebugConfigTerminationMode::EXIT_SUCCESS)
    ->useTerminationExitSuccess()
    ->useTerminationThrowException()
    # Show only properties, empty => show ALL (Called: includedProperties)
    ->withProperties([
        'key0', # default: VariableDebugClassPropertyShowValueMode::SHOW_DETAIL
        'key1' => VariableDebugClassPropertyShowValueMode::SHOW_TYPE_ONLY,
        '0.key1.key2' => true, # same: VariableDebugClassPropertyShowValueMode::SHOW_DETAIL
        '0.key1.key2' => false, # same: VariableDebugClassPropertyShowValueMode::SHOW_TYPE_ONLY
    ])   # + WARNING - NOT USE for global config
    ->withPatternProperties([
        # pattern (#: any number, ?: any characters except dot (.)
        '#.key0.?',
        '?.key0.#',
    ])
    # Ignore show properties, empty => skipped (Called: excludedProperties)
    ->withoutProperties(['key1', '0.key1.key2']) # WARNING - NOT USE for global config
    ->addClassProperties(\App\Models\User::class, ['attributes']) # Called: classIncludedProperties
    ->withShowExcludedCount(true) # # Show Excluded Count or not, Default: true
    # Build Later (Because PDO is a Native Extension, cannot Reflection
    ->addBuildLaterClassProperties(PDO::class, function (PDO $pdo) {
        return ['inTransaction' => $pdo->inTransaction()];
    })
    # Add custom plugin
    ->addClassPropertiesFromPlugin(
        new VariableDebugClassPropertyPluginAdapterLaravel()
    )
    ->addClassPropertiesFromPluginLaravel() # Plugin snippet for Laravel (if use Laravel)
    ->addClassPropertiesFromPluginPDO() # Plugin snippet for PDO
    ->withShowKeyOnly(true) # WARNING - NOT USE for global config
    ->withIgnoredShowKeyProperties(['field1.key1', 'field2']) # have effected if showKeyOnly enabled
    ->build();

# Usecase
$u = \App\Models\User::factory()->create();

v_dump($u, ['x' => ['tmp1' => 1, 'tmp2' => 2]])
     # override global config
    ->on($config);

v_dd($u, ['x' => 1, (object)['y' => 1]])
    # override global config
    ->presetCompact(10)
    ->useTerminationExitSuccess()
    ->showKeyOnly(['connection', 'attributes.name'])
    ->withProperties(['fillable', 'hidden', 'connection', 'attributes'])
    ->withoutProperties(['hidden']);
```

### FOR ME

[](#for-me)

```
----------------
# Test App (use for test library)
## composer.json:
## + By default, composer scan from https://packagist.org, if not found, composer scan from repositories
"require": {
    "php": "^8.2",
    "lightla/variable-debugger": "*@dev"
}
"repositories":[
    # Setting for local repo
    {
        "type": "path",
        "url": "/var/www/this-library" # Docker mount host
    },
    # Setting for private repo
    {
        "type": "vcs",
        "url": "git@github.com-lightla:lightla/variable-debugger.git",
        "options": {
            "no-api": true
        }
    }
],

## Docker mount host for test app
- ../../composer.json:/var/www/this-library/composer.json:ro
- ../../src:/var/www/this-library/src:ro
- ../../tests:/var/www/this-library/tests:ro

----------------
# GIT Knowledge
## Case 1: Git exclude local
• File .git/info/exclude like .gitignore but existing only on my local
• No have any change or commit on GitHub

## Case 2: Git assume-unchanged
• Báo cho Git "làm như file này không thay đổi"
• Dù bạn sửa file, Git vẫn ignore
• Dùng khi muốn giữ file nhưng không track changes

## GIT SHOW REMOTE TAG
git ls-remote --tags origin

## GIT DELETE TAG VIA Pattern
git tag \
| grep "^v1\.0\." \
| grep -Ev "v1\.0\.16|v1\.0\.17" \
| xargs -r git tag -d

----------------
# Test
./vendor/bin/pest this-library/tests
./vendor/bin/phpunit this-library/tests --testdox
./vendor/bin/pest this-library/tests --testdox

```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance75

Regular maintenance activity

Popularity12

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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 ~5 days

Total

9

Last Release

133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b167f50ddf1bf799262e049d3086b0ccce239863de00879aecd8fb52e8b4cba?d=identicon)[light-developer](/maintainers/light-developer)

### Embed Badge

![Health badge](/badges/lightla-variable-debugger/health.svg)

```
[![Health](https://phpackages.com/badges/lightla-variable-debugger/health.svg)](https://phpackages.com/packages/lightla-variable-debugger)
```

PHPackages © 2026

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