Logging and debugging on server side with Chrome Tools!

A topic built around all the best posts and information from the site. It includes informative posts, links to resources, tips, tricks, ect... Do not post here unless it will become a resource based post.
Post Reply
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Logging and debugging on server side with Chrome Tools!

Post by Ark »

Chrome Logger a really cool and useful tool, you can log data from server side to Chrome's console and view it like a normal object/array as if it was on Javascript. Personally for me debugging with php was really a headeche, checking large arrays on php made alot of mess. But with this is much simple.

It supports PHP, Python, Node.js and others.

You need to install a chrome plugin and then include a file e.g.

Code: Select all

<?php
include 'ChromePhp.php';
ChromePhp::log('Hello console!');
ChromePhp::log($_SERVER);
ChromePhp::warn('something went wrong!');
<?
Link: http://craig.is/writing/chrome-logger

Enjoy !! :p
Orgullo Catracho
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Logging and debugging on server side with Chrome Tools!

Post by Jackolantern »

Nice! And yeah, PHP debugging is kind of a mess. Even the IDEs that claim they have it typically require you to download an external PHP debugger and rig it all up yourself, so in the end, all they are offering you is the buttons to press to make it work lol. Very cool if this really allows full, real debugging of PHP on Chrome or anywhere haha.
The indelible lord of tl;dr
Post Reply

Return to “Resources”