How to more effectively debug PHP code in the vein JavaScript with Firebug or XCode?
- by racl101
Hi everyone,
I'm kind of a newbie with PHP so please bear with me. I would like to know if there was an effective way of debugging PHP code so that I don't have to have debugging messages display on the browser.
For example, I find var_dump and print_r functions to be excellent for debugging variables, function calls and arrays respectively. The problem is I have been asked to debug code on a live site (no dev site, I know it is a horrible practice but this is not my project from the start.) So I would like to know what core function or php library or whatever else it is that I could use to log debugging calls in to log that I can check so I don't have to send debugging calls to the browser on a live site?
I like the way you can use the console.log function in JavaScript code and check it in Firebug or the Webkit Console and I also like like the console window in Xcode and I was wondering if there was some similar tool for PHP debugging. Any extra info and pearls of wisdom would be greatly appreciated.
Thanks,
racl101.