How to more effectively debug PHP code in the vein JavaScript with Firebug or XCode?

Posted by racl101 on Stack Overflow See other posts from Stack Overflow or by racl101
Published on 2010-04-09T20:19:12Z Indexed on 2010/04/09 20:23 UTC
Read the original article Hit count: 330

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about php

Related posts about debugging