Jump to content
Sign in to follow this  
Asenar

[Tips] Usage Of _Tools.Php Debug Class

Recommended Posts

When you download prestashop software, you can see some files in the subdirectory /override/classes/ . Theses files are not used if you don't remove the underscore at the beginning of the filename.

 

You should do that only if you are in a development environment. The overriding of the Tools class provide convenient overriding methods and new function for helping debug :

 

- immediate redirection is replaced by a 5 second wait then redirect : see methods Tools::redirect(), Tools::redirectLink() and Tools::redirectAdmin()

- the debugging functions p() and d() (shortcut to Tools::D(), Tools::dieObject() and Tools::P() will now use FirePHP instead of the old "print_r" method.

- new function error(), warn(), info(), log() and trace() are created. They are shortcut for the equivalent Tools::xxx() methods and also uses FirePHP.

 

 

For using FirePHP, you need Firefox, and the both extension Firebug (who doesn't have it yet ?) and FirePHP. You can also use the extension FirePHP Companion.

 

When using FirePHP extension, remember you need to activate the net panel !

  • Like 1

Share this post


Link to post
Share on other sites

Hi i want use tools override for debugging prestcore and presta modules for debug with firephp, but i dont how it use

 

may you please write example for prestcore and presta module

 

I try Tools::log()

 

but nothing obtain

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More