1. Xdebug must be installed in accordance with the PHP version, otherwise the load will fail. When you install it, check out the installation instructions for Xdebug are mainly--with-php-config=/php installed bin directory/php-config Otherwise you cannot find the version information of the installed PHP.
2. After the installation is complete, increase the Zend extension in the php.ini instead of extension
[XDebug]
zend_extension= "/home/lyd/download/xdebug-2.1.4/modules/xdebug.so"
Xdebug.profiler_enable = On
Xdebug.default_enable = On
Xdebug.trace_output_dir= "/tmp/xdebug"
Xdebug.trace_output_name = trace.%c.%p
Xdebug.profiler_output_dir= "/tmp/xdebug"
Xdebug.profiler_output_name= "cachegrind.out.%s"
Xdebug.remote_enable=1
Xdebug.remote_handler=dbgp
Xdebug.remote_mode=req
Xdebug.remote_host=tradeadmin
xdebug.remote_port=9002
To ensure that the program has write access to/tmp/xdebug.
3, restart PHP-FPM and Web server, view Php_info (); See if there are any extensions to the Xdebug if there is a description of the installation success.
4. and develop IDE integration, take NetBeans as an example
NetBeans 7.0 tools = "option =" php= "Debug"
Port should be the same as the xdebug.remote_port=9002 setting,
Session id:www (This is important, you may see the Xdebug.idekey option in the Php_info () xdebug extension) should be www by default
5. Right-click the project's Web properties in the project source file.