[TomatoCart] How to debug the TomatoCart system with chromephp extension

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.

Snip20150321_1

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.

Snip20150321_23. 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

Tags: , , , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

One Comment on [TomatoCart] How to debug the TomatoCart system with chromephp extension

  1. Dartco says:

    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)

Leave a Reply

Your email address will not be published. Required fields are marked *