Xdebug Introduction
Xdebug is an open source PHP program debugger (a debug tool) that can be used to track, debug, and analyze the health of PHP programs.
Xdebug Installation
First let PHP error display, only need to modify the php.ini of the 2 instructions, the displayerrors and Htmlerrors are set to ON, as shown below
Html_errors = Ondisplay_errors = On
Of course if you need to see more information, such as printing the call stack, you need to install Xdebug, which is especially helpful for more complex code systems.
Xdebug is a module of PHP, need to compile the installation, I use LNMP installed php,php is installed by default to/usr/local/php, and then do a hard link to/usr/bin
Compile Xdebug First
Download Xdebug wget http://www.xdebug.org/files/xdebug-2.2.3.tgz
and start compiling.
Tar xzf xdebug-2.2.3.tgzcd xdebug-2.2.3/usr/bin/phpize./configure--with-php-config=/usr/local/php/bin/ Php-configmake make test I have a problem here is to open the Proc_openmake install in the php.ini file
Compile finish Next Modify the php.ini configuration, you can first go to your PHP installation path under the Lib library directory to see if the xdebug.so file is generated, if it is generated, add the following to the php.ini file
no-debug-non-zts-20090626 this folder name and PHP version are one by one corresponding
zend_extension= "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" 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.cli_color = 2
Restart PHP-FPM, write the wrong PHP code, refresh the browser, you can see the error prompt.
This article turns from http://www.phperz.com/article/14/1214/41050.html
How to install and configure Xdebug under Linux