Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expand PHP Stack Trace Arguments

On a stack trace returned from a PHP application in development, long string arguments to a function are truncated when display on the error page:

Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO "tb...', Array)

How can I expand the query argument so the full text is visible? The server is running PHP 5.3.3.

like image 291
Eric Pruitt Avatar asked Dec 22 '10 18:12

Eric Pruitt


1 Answers

Use debug_backtrace instead. It will give you the whole trace and doesn't trim arguments as far as I know.

On a second thought: You might get away with it by using

try {
   ...
} catch (Exception $e)
   var_dump($e->getTrace());
}

instead.

like image 96
André Hoffmann Avatar answered Oct 05 '22 02:10

André Hoffmann