Hi Dave,
The following is not a debugger, but it can be very helpfull nevertheless:
http://nl2.php.net/manual/en/functio...-backtrace.php
feed the array to print_r to see what exactly you get. Then it should
not be hard to build a fancy backtrace printing function.
If you make an error handling function and set its name with
set_error_handler you can make it print a backtrace below the
coventional error info. (search the manual for set_error_handler)
Limitation: it will not work for fatal errors - imho the person that
decided that php developers do not need error handling for fatal errors
made a fatal mistake :-(((
Greetings,
Henk Verhoeven,
www.phpPeanuts.org.
Dave Moore wrote:[color=blue]
> Hi All,
> I've just started writing PHP scripts. I was wondering whether there was
> any sensible debugging facilities that I'm not aware of. Basically, my usual
> development procedure involves writing the script and then testing using IE.
> However, it appears that unless the PHP is perfect (ie. devoid of any
> syntactical errors) then nothing at all is output to the browser. Personally
> I find this very frustrating as there's no clue as to where the error is. I
> then commence on a wild goose chase putting in various debugging 'echo'
> statements and commenting out various chunks of PHP code until something
> works. There must be a better approach than this.
>
> Are there any option or selections I can make to give me some debugging
> output?. Is there a parser I can use to ensure there are no syntactical
> errors before running the script?. Or a PHP debugger I can use to step
> through the code command by command?.
>
> Thanks,
> Dave
>
>
>[/color]