1. install Xdebug use command line installation: sudoapt-getinstallphp-pearsudoapt-getinstallphp5-devsudopeclinstallxdebug compilation installation download the corresponding xdebug source code installation package from here: http://pecl.php.net/pa
1. install Xdebug
Use command line installation:
sudo apt-get install php-pearsudo apt-get install php5-devsudo pecl install xdebug
Compile and install
Download the corresponding xdebug source code installation package from here: http://pecl.php.net/package/xdebug
Decompress the tgz file to the specified directory.
cd /path/to/xdebugphpize./configure --with-php-config=/usr/local/php/bin/php-configmakesudo make install
2. configuration
After the installation is complete, add the following line to php. ini:
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
Note: After zend_extension, you must keep up with the full path of xdebug. so. Otherwise, an exception occurs:
Failed loading xdebug.so: ?xdebug.so: cannot open shared object file: No such file or directory
The following are some settings for Xdebug.
[Xdebug]xdebug.default_enable = Onxdebug.show_exception_trace = Onxdebug.show_local_vars = 1xdebug.max_nesting_level = 50xdebug.var_display_max_depth = 6xdebug.dump_once = Onxdebug.dump_globals = Onxdebug.dump_undefined = Onxdebug.dump.REQUEST = *xdebug.dump.SERVER = REQUEST_METHOD,REQUEST_URI,HTTP_USER_AGENTxdebug.auto_trace=Onxdebug.collect_params=Onxdebug.collect_return=Onxdebug.trace_output_dir="/tmp/xdebug"xdebug.profiler_enable=Onxdebug.profiler_output_dir="/tmp/xdebug"
Restart apache.
If you want to determine whether the installation is successful, you can view it through phpinfo:
If you can see the preceding information, the installation is successful.