What is Xdebug?
Xdebug is a php extension for debugging PHP programs that can provide a lot of useful debugging information.
Installation of 1.Xdebug
First of all, let's assume that our development platform is Windows XP with Apache installed and php,php installed in the C:\php directory.
First go to Xdebug's official website http://xdebug.org/to download your PHP version of the xdebug DLL file, download it down in the PHP ext directory (C:\php5\ext), you can follow the other extensions of the naming method, Remove the rear xdebug version number directly into Php_xdebug.dll.
Then modify the php.ini, first find the location of the php.ini configured on your machine (C:\php\php.ini or C:\windows\php.ini), add the Xdebug configuration information at the end of the file.
[Xdebug]
Zend_extension_ts= "C:/php/ext/php_xdebug.dll"
Xdebug.auto_trace=on
Xdebug.collect_params=on
Xdebug.collect_return=on
Xdebug.trace_output_dir= "C:\Temp\xdebug"
Xdebug.profiler_enable=on
Xdebug.profiler_output_dir= "C:\Temp\xdebug"
Parameter explanation:
Zend_extension_ts= "C:/php/ext/php_xdebug.dll"
Load Xdebug, can not be loaded in extension=php_xdebug.dll way, must be loaded in a ZEND way, otherwise installed, phpinfo print out of the Xdebug section will have must LOADED as ZEND Warning message for extension (unknown reason).
Xdebug.auto_trace=on;
Automatically opens the "Monitoring function call procedure", which can output the monitoring information of function calls as files in the directory you specify. The default value for this configuration entry is off.
Xdebug.collect_params=on;
To open the feature that collects function parameters. The parameter values of the function call are included in the monitoring information of the Function procedure call. The default value for this configuration entry is off.
Xdebug.collect_return=on
To open the collection function return value function. The return value of the function is included in the monitoring information of the Function procedure call. The default value for this configuration entry is off.
Xdebug.trace_output_dir= "C:\Temp\xdebug"
To set the path of the output file where the function calls the monitoring information, note that this directory needs to be manually built.
Xdebug.profiler_enable=on
, open the Performance Monitor.
Xdebug.profiler_output_dir= "C:\Temp\xdebug";
Setting the path of the output file of the performance monitoring information.
There are some more specific parameter settings, see: http://www.xdebug.org/docs-settings.php
Once configured, restart Apache, and use Phpinfo () To view information about the Xdebug extension as follows.