On Feb 9, 2008 3:02 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote:

> It suddenly dawned on me that you are doing an echo for every paremeter,
> a debugger will never completely alleviate the need for this, however
> try using:
> print_r(get_defined_vars());
> instead, that way you get everything output that you could need, it's
> often also worth putting an exit(); after prining out so you can see
> where the script is failing; if indeed it is.
>

get_defined_vars() can be a real hassle to sift through, mainly because it
spits out a bunch of data you dont usually want to see.  if you want to see
the values of a given functions parameters w/o an echo statement for each
on the best way is to use, func_get_args();
eg.
die(var_dump(func_get_args()));

also, xdebug has something called function traces; which you dont need to
configure a client for.  it will simply log all function calls to a file and
its
configurable, so you can have it log the values of actual parameters if you
like.  and it also ships w/ a special highlighter for vim, which is quite
nice.
http://xdebug.org/docs/execution_trace

-nathan

Reply via email to