How to enable formatted Xdebug errors and traces

主宰稳场 提交于 2019-12-23 08:50:44

问题


I am not sure when or what I have changed, but suddenly xdebug no longer renders its formatted stacktraces. Instead, it renders the stacktrtace without any HTML; here is an example; Whereas I would expect the orange tables like here

I have searched the documentation, but cannot find any reference to a setting or config that would (un)set this. What did I do wrong?

My xdebug.ini (Ubuntu, so /etc/php5/conf.d/xdebug.ini) is small:

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

xdebug.default_enable = 1
xdebug.auto_trace = 1

xdebug.remote_enable = 1
xdebug.remote_port = 9010
xdebug.remote_host = audrey

; xdebug.profiler_enable = 1

; Markup of var_dump
xdebug.overload_var_dump = 1

回答1:


Xdebug respects PHP's normal settings regarding error reporting and formatting. In this case, you have most likely "html_errors" set to Off in php.ini. Turn it back to On, and Xdebug should show nice orange tables again.

cheers, Derick




回答2:


Try this

ini_set('xdebug.auto_trace', 1);

http://php.net/manual/en/function.ini-set.php



来源:https://stackoverflow.com/questions/8877817/how-to-enable-formatted-xdebug-errors-and-traces

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!