尝试使用默认的仅当前行错误消息来调试 PHP 是很可怕的.发生错误时,如何让 PHP 生成回溯(堆栈跟踪)?
Trying to debug PHP using its default current-line-only error messages is horrible. How can I get PHP to produce a backtrace (stack trace) when errors are produced?
Xdebug 打印关于错误的回溯表,并且您不必编写任何 PHP 代码来实现它.
Xdebug prints a backtrace table on errors, and you don't have to write any PHP code to implement it.
缺点是您必须将其安装为 PHP 扩展.
Downside is you have to install it as a PHP extension.
这篇关于如何让 PHP 在出错时产生回溯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!