Recipe 20.3. Printing a Stack Trace20.3.1. ProblemYou want to 20.3.2. SolutionUse function stooges() { This will print: woo woo woo! 20.3.3. DiscussionThe debug_backtrace( ) The more complicated your application, the more information you can expect to have returned from the backtrace functions. For debugging larger codebases, you may achieve bug-hunting success more quickly using a full debugging extension, such as If all you need is a little more information than you can get from sprinkling print 'Here I am on line ' . __LINE__; statements throughout your code, debug_backtrace( ) and/or debug_print_backtrace( ) will suit your needs well. If you're still using PHP 4 and want the PHP 5only debug_print_backtrace( ) function, you can use PEAR's 20.3.4. See AlsoDocumentation on debug_backtrace( ) at http://www.php.net/debug-backtrace and on debug_print_backtrace( ) at http://www.php.net/debug-print-backtrace; the PEAR PHP_Compat package at http://pear.php.net/package/PHP_Compat; Zend Studio IDE at http://www.zend.com/products/zend_studio; PHPEdit IDE at http://www.waterproof.fr/products/PHPEdit/. |
Friday, December 25, 2009
Recipe 20.3. Printing a Stack Trace
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment