Debugging aids (after the style of: Error management)
| From: | DL Neil | Date: | Fri, 26 Oct 2001 09:43:49 +0000 |
| Subject: | Debugging aids (after the style of: Error management) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-72425@lists.php.net to get a copy of this message | ||
Don't you like the side-benefits of this list, eg that someone comes up with a question that
gets your thought processes
running or suggests an idea you'd not otherwise come up with!?
So further to the question:
> How can I know the line and the file from where a function has called. I
> already know __FILE__ and __LINE__, but I don't want to transmit them in
> arguments.
is there a debugging facility in PHP which displays a 'map' of which functions have called
which?
So for example, a script crashes at line_56 in file_fred.php, which is what we've all come to
know and love; but I'd
like to know that it got there by the mainline calling FnOpen(), which called FnInitialise(), which
in turn called
FnUncleTomCobbleighAndAll(), where some incompetent happily three layers down tried to share out the
spoils by dividing
by zero (or whatever)...
Looking in the manual I started with:
<<<<<
Chapter 8. Constants
Predefined constants
A constant is a identifier (name) for a simple value. As the name suggests, that value cannot change
during the
execution of the script (the magic constants __FILE__ and __LINE__ are the only exception). A
constant is case-sensitive
by default. By convention constants are always uppercase.
>>>>>
but if these two are the only "magic constants" then I'm out of luck there. So I
meandered through the PHPINFO and
environment variables, but nothing stood up and popped me in the eye.
Anyone know better/have a bright idea?
=dn