Good Game, Great Code

With gg, PHP Debugging is a breeze!

About GG

GG Client is a debugging client tool for PHP Laravel framework developers. It allows you to visually inspect the values stored in variables and continue with continuous development. You no longer need to follow the conventional approach of printing variables on web pages using traditional methods.
GG Client
Please download the installation file suitable
for your operating system from the given options.

Shortcuts

Variable View Cmd + 1
Exception View Cmd + 2
Local Saved View Cmd + 3
Reverse Mode Cmd + R

Requirements and Install

Requirements

PHP 8.3 or later is required to use eyedroot/gg.
The Laravel framework also requires 9.0 or later.

Install

composer require --dev eyedroot/gg

Environments .env

GG_ENABLED=true
GG_HOST=host.docker.internal# If you using docker container
GG_EXCEPTION_LISTENER=true
GG_HTTP_RESPONSE_LISTENER=true
GG_MODEL_QUERY_LISTENER=true

Functions

Print Variables

<?php
gg($foo, $bar);
gd($test); // exit

Note

<?php
for ($i= 0; $i < 100; $i++) {
gg($i)->note(fn() => $i % 2 === 0, '😛');
}
<?php
gg($i)->note('Hello, Note');

Memory Usage

<?php
gg()->begin();
// ..
// some your codes
// ..
gg()->end();

With backtrace

<?php
gtrace($foo);

// or enable trace option
gg()->onTrace(); gg($bar);

Laravel Framework

Collection

<?php
collect(['taylor', 'abigail', null])->gg();

Eloquent

<?php
// show query
\App\Models\User::where('id', 1)->where('name', 'gg')->gg();

Http Watcher

The Guzzle Http capture listener is activated. It is a great tool when developing an MSA architecture. You can easily check how long the actual Http request takes, whether it responds normally, and what headers it contains.
throwable

Sql Watcher

When the Model is executed, it automatically captures the query and allows you to see which queries were executed for how many milliseconds in the currently executed logic. Syntax highlighting works to output queries in a developer-friendly manner.
throwable

Exception Watcher

The eyedroot/gg library utilizes Laravel framework's ServiceProvider to detect when an exception object is logged, allowing clients to quickly inspect error details. Additionally, the exception object collects the call stack by default, providing source code visibility along with the error information.
throwable