以下是我在http://xdebug.org/docs/basic Xdebug官方documention里阅读并翻译的。
本人英语水平有限,如果有错误还望指望。
相关参数
1.xdebug.default_enable = 1
参数类型Boolean,默认值为1
当设置为1,堆栈跟踪默认会显示一个错误事件。
你可以在单个页面上禁用xdebug,只需使用xdebug_disable()
2.xdebug.max_nesting_level = 100
参数类型integer,默认值为100
递归查找错误的最多嵌套次数
3.xdebug.scream = 0
参数类型boolean,默认值为0
当设置为1,那么所有使用@操作的警告、错误将不再隐藏。
注:尽量减少使用@操作,性能开销会加大。
相关函数
1.xdebug_call_class()
返回从当前函数/方法调用的类名
2.xdebug_call_file()
返回从当前函数/方法调用的文件
3.xdebug_call_function()
返回从当前函数/方法调用的函数名
4.xdebug_call_line()
返回从当前函数/方法调用函数的行号
5.xdebug_disable( )
关闭xdebug错误跟踪
6.xdebug_enable()
开启xdebug错误跟踪
返回结果:Called @ /home/httpd/html/test/xdebug_caller.php:12 from {main}
7.xdebug_get_headers()
返回所有通过PHP的header()设置的值,或者其他头设置。
返回类型为数组
8.xdebug_is_enabled( )
返回是否启用了堆栈跟踪
9.xdebug_memory_usage()
返回当前内存使用情况
10.xdebug_peak_memory_usage()
返回高峰内存使用情况
11.xdebug_time_index()
返回自脚本启动到指定脚本索引行所用时间