Re: Debugging PHP scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 29, 2008 at 11:33 AM, Edward Diener <eldiener@xxxxxxxxxxxxxx>wrote:

> I am fairly new to PHP. What is the best way of debugging PHP scripts ?
>
> I have put in echo statements to tell me what is happening, but perhaps
> there are better methods.
>
> I have a PHP script on a server, which I access from a client side program
> ( written in C++ ) and the script is not returning the correct data. I am
> looking for some easy way to determine what is wrong.
>
> Thanks !
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Echo's throughout the code isn't a bad way.  You can also utilize print_r()
and exit() and other things.  Really the idea is to set break points, and
return data to you that is useful for killing the bug.  Its not something
that you can simply so "Do it like this", as there is really rules to how
you should debug really.  Just basic deductive reasoning, and some helpful
information along the way.

Do you use an IDE at all?  You may want to check some out with debuggers
built in.  That would help you out.

-- 
-Dan Joseph

www.canishosting.com - Plans start @ $1.99/month.

"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux