As a developer, you may need to debug the TomatoCart system to find the reason of some issue existing in your store. In this article, I will introduce you a useful tool called chromephp that is a class for logging PHP variables to the Google chrome console.
Installation
1. Install the Chrome extension from: https://chrome.google.com/extensions/detail/noaneddfkdjfnfdakjjmocngnfkfehhd
2. Click the chrome php extension icon in the browser to enable it.
3. Download ChromePhp.php from http://craig.is/writing/chrome-logger
4. Put ChromePhp.php into tomatocart root directory > ext fold
5. Find includes > application_top.php to add following code into it:
require(DIR_FS_CATALOG . 'ext/ChromePhp.php');
6. Find admin > includes > application_top.php to add following code into it:
require(DIR_FS_CATALOG . 'ext/ChromePhp.php');
Now, you could log some debug message and variables in any place of TomatoCart system.
For example:
ChromePhp::log('Debug message'); ChromePhp::log($_SERVER); ChromePhp::warn('warning message');
More information can be found at http://www.chromelogger.com. Please try it by yourself.
Looking for quality TomatoCart hosting? Check out Arvixe Web Solutions
It’s much better to use normal debugger (xdebug) + good IDE like Netbeans or PHPDesigner than this and Firefox + The Easiest Xdebug instead of Chrome (Chrome eats a LOT of memory)