基本属性(参数)
类型: boolean,默认值: 1
这是xdebug的基本设置,默认在调试跟踪时显示错误信息。可以使用xdebug_disable()函数使你的代码不显示调试显示。
类型: int, 默认值: 0, 始于Xdebug 2.3版
此设置设为1时,不管PHP设置display_errors设置值是多少,错误信息将强制性一直显示。
类型: int, 默认值: 0, 始于Xdebug 2.3版
这是类似error_reporting的掩码值,它使用逻辑或关系组织掩码值来确定哪些错误该不该显示。该设置只能在php.ini配置,不能用ini_set()函数。
xdebug.halt_level
类型: int, 默认值: 0, 始于Xdebug 2.3版
此设置值将一掩码值来决定转换成哪种类型的错误。支持四种级别的的设置:
xdebug.halt_level=E_WARNING|E_NOTICE|E_USER_WARNING|E_USER_NOTICE<br><br><br>
Example: <span style="color: #000000;">php </span><span style="color: #0000ff;">function</span> fix_string(<span style="color: #800080;">$a</span><span style="color: #000000;">) { </span><span style="color: #0000ff;">echo</span> "Called @ ".<span style="color: #000000;"> xdebug_call_file()</span>. ":".<span style="color: #000000;"> xdebug_call_line()</span>. " from ".<span style="color: #000000;"> xdebug_call_function(); } </span><span style="color: #800080;">$ret</span> = fix_string(<span style="color: #0000ff;">array</span>('Derick'<span style="color: #000000;">)); </span>?> <span style="color: #008000;">//</span><span style="color: #008000;"> Called @ /home/httpd/html/test/xdebug_caller.php:12 from {main}</span>
<span style="color: #000000;">php </span><span style="color: #008080;">header</span>( "X-Test", "Testing"<span style="color: #000000;"> ); </span><span style="color: #008080;">setcookie</span>( "TestCookie", "test-value"<span style="color: #000000;"> ); </span><span style="color: #008080;">var_dump</span><span style="color: #000000;">( xdebug_get_headers() ); </span>?> <span style="color: #008000;">/*</span><span style="color: #008000;">* Returns: array(2) { [0]=> string(6) "X-Test" [1]=> string(33) "Set-Cookie: TestCookie=test-value" } </span><span style="color: #008000;">*/</span>
<span style="color: #000000;">php </span><span style="color: #0000ff;">echo</span> xdebug_time_index(), "\n"<span style="color: #000000;">; </span><span style="color: #0000ff;">for</span> (<span style="color: #800080;">$i</span> = 0; <span style="color: #800080;">$i</span> $i++<span style="color: #000000;">) { </span><span style="color: #008000;">//</span><span style="color: #008000;"> do nothing</span> <span style="color: #000000;">} </span><span style="color: #0000ff;">echo</span> xdebug_time_index(), "\n"<span style="color: #000000;">; </span>?> <span style="color: #008000;">/*</span><span style="color: #008000;">* Returns: 0.00038003921508789 0.76580691337585 </span><span style="color: #008000;">*/</span>