Are There Any Debugging Programs For Php? How Do You Debug Php Code?
I have used other programming languages such as C, C++ where you can debug the code using the IDE however how is this possible with PHP? I would like to step through the program and see at run time what values are being assigned.
Related Posts:
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


3 Responses to “Are There Any Debugging Programs For Php? How Do You Debug Php Code?”.
Personally, I never use any debugger: I debug on-line!
For each routine (or function) where I doubt the value of a valiable, I put
echo (“var=”.$var.”
“);
If needed for arrays:
while(list($name,$value) = each(arrayname, such as $_POST)) {
$$name = $value;
echo ($name.”=”.$value);}
or, simply:
echo (“
"); print_r($array); echo ("“);
Debuggers have one big problem: they “run” a PhP that may not be the PhP on your server! (and what works with the debugger may not work on-line…)
Searching google for “php debugger” returns this site, which looks like it offers a free debugger…http://dd.cron.ru/dbg/
There are several php IDE’s and Editors that have built in debugers, the best in my opinion is the one from nusphere called phped. I’ll include some sources below
Leave a comment.