rafapas22 Posted April 29, 2018 Share Posted April 29, 2018 Goodnight. I have a question with PS1.7, I use Tools :: fd ('text', 'log') to be able to debug my modules but with 1.7 I can not, it does not work. What alternative do I have to debug php files and see logs in the Chrome console in PS 1.7? Thanks in advance Link to comment Share on other sites More sharing options...
bellini13 Posted May 1, 2018 Share Posted May 1, 2018 Below is the code from PS v1.6. You can do with that whatever you like. /** * Display a var dump in firebug console * * @param object $object Object to display */ public static function fd($object, $type = 'log') { $types = array('log', 'debug', 'info', 'warn', 'error', 'assert'); if (!in_array($type, $types)) { $type = 'log'; } echo ' <script type="text/javascript"> console.'.$type.'('.Tools::jsonEncode($object).'); </script> '; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now