如何在zend框架中创建堆栈跟踪?

zend framework how to do a stack trace?
Stack trace:

# 0 C: \ apache \ www \ itransition \ library \ Zend \ Controller \ Front.php (954): Zend_Controller_Dispatcher_Standard-> dispatch (Object (Zend_Controller_Request_Http), Object (Zend_Controller_Response_Http))
# 1 C: \ apache \ www \ itransition \ library \ Zend \ Application \ Bootstrap \ Bootstrap.php (97): Zend_Controller_Front-> dispatch ()
# 2 C: \ apache \ www \ itransition \ library \ Zend \ Application.php (366): Zend_Application_Bootstrap_Bootstrap-> run ()
# 3 C: \ apache \ www \ itransition \ index.php (26): Zend_Application-> run ()
# 4 {main}

By catching a thrown exception, you can use Exception::getTraceAsString()

try
{
    throw new Exception('Just testing...');
}
catch (Exception $e)
{
    echo $e->getTraceAsString();
}

see http://php.net/debug_backtrace

you also find many formatting examples in the comments