install
1.wget https://xdebug.org/files/xdebug-2.5.5.tgz
2.tar zxvf xdebug-2.5.5.tgz
3.cd xdebug-2.5.5
4.phpize
5../configure --enable-xdebug
6.make && make install
7.在php.ini中添加一行
zend_extension=xdebug.so
config
1.xdebug.auto_trace=0
2.xdebug.trace_enable_trigger=1
3.xdebug.collect_vars=1
4.xdebug.collect_params=4
5.xdebug.collect_return=1
6.xdebug.profiler_enable=0
7.xdebug.profiler_enable_trigger=1
8.xdebug.trace_output_dir="/test/xdebug/"
9.xdebug.profiler_output_dir="/test/profiler/"
10.xdebug.show_exception_trace=1
11.xdebug.profiler_output_name = cachegrind.out.%t.%p
12.xdebug.collect_assignments=1
function
xdebug_print_function_stack();
xdebug_start_trace();
xdebug_stop_trace();