Install the php-console Chrome extension first:

Then install the server library file: github.com/barbushin/p…

Install PHP composer require php-console/php-console

How to use these library files in PHP code:

__autoload.php is introduced first with require:

$handler = PhpConsole\ handler ::getInstance(); $handler->start();

Some common printing methods:

Print effect with label:

$handler->debug(‘ called from handler debug ‘, ‘some.three. Tags’);

Direct printing: PhpConsole\Connector::getInstance()->getDebugDispatcher()->dispatchDebug(‘ called from debug dispatcher without tag s’);

Here’s another abbreviation:

PhpConsole\Helper::register(); // Required to register PC class in global namespace, must be called only once – Register PC this namespace

PC: : debug (‘ called the from PC: : debug () ‘, ‘db’); PC: : db (‘ called the from PC: : __callStatic () “); // means “DB” will be handled as debug tag

Print object:

Output:

For more of Jerry’s original articles, please follow the public account “Wang Zixi “: