Home >Backend Development >PHP Tutorial >XDebug manual configuration and usage instructions under Windows_PHP tutorial

XDebug manual configuration and usage instructions under Windows_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:36:43903browse

1. Download the XDebug binary file: http://www.xdebug.org/download.php
 5.2 http://www.xdebug.org/files/php_xdebug-2.1.0-5.2-vc6.dll
 5.3 http://www.xdebug.org/files/php_xdebug-2.1.0-5.3-vc6.dll
2. Find php.ini
3. If ZendOptimizer has been configured, you need to block ZendOptimizer first The relevant configuration is usually as follows:
[Zend]
zend_extension_manager.optimizer_ts="pathZendOptimizer-3.3.0libOptimizer-3.3.0"
zend_extension_ts="pathZendOptimizer-3.3.0libZendExtensionManager.dll"
4. Add XDebug configuration:
zend_extension_ts="path/xdebug/php_xdebug-2.1.0-5.2-vc6.dll"
[Xdebug]
xdebug.profiler_enable=on
xdebug.trace_output_dir="pathxdebug"
xdebug.profiler_output_dir="pathxdebug"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
"path " needs to be changed to your own local path.
5. Restart Apache or IIS.
6. Check the output of phpinfo. If you see the XDebug option, it means the configuration is successful.

The following are articles from other netizens
1. Install the xdebug module1. Go to www.xdebug.org to download the module file of the corresponding version of php, and save the downloaded file to the ext directory of php. You can do it yourself Modify the name of the file, such as saving it as: php_xdebug.dll
2. Modify php.ini and add the following information


Copy the code The code is as follows:
[Xdebug]
zend_extension_ts="c:/webserver/php5/ext/php_xdebug.dll"
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug. collect_return=on
xdebug.trace_output_dir="c:/webserver/php5/debuginfo"
xdebug.profiler_enable=on
xdebug.profiler_output_dir="c:/webserver/php5/debuginfo"


Parameter explanation:
zend_extension_ts="c:/webserver/php5/ext/php_xdebug.dll"
;Load the xdebug module. You cannot load it with extension=php_xdebug.dll here. You must load it with zend. Otherwise, phpinfo will not display the xdebug item after installation.
xdebug.auto_trace=on;
;Automatically turn on the "monitoring function call process" function mode. This function can output the monitoring information of function calls in the form of a file in the directory you specify. The default value of this configuration item is off.
xdebug.collect_params=on;
;Turn on the function of collecting "function parameters". Include the parameter values ​​of the function call in the monitoring information of the function procedure call. The default value of this configuration item is off.
xdebug.collect_return=on
; Turn on the function of collecting "function return value". Include the return value of the function in the monitoring information of the function procedure call. The default value of this configuration item is off.
xdebug.trace_output_dir=”c:Tempxdebug”
; Set the path to the output file of function call monitoring information.
xdebug.profiler_enable=on
;Open the performance monitor.
xdebug.profiler_output_dir="c:Tempxdebug";
;Set the path to the performance monitoring information output file.
There are also some more specific parameter settings, see: http://www.xdebug.org/docs-settings.php
3. Restart apache
In this way, when running php locally , some debugging information files will be generated in the set directory:
The file name format of the function call process monitoring information file: trace.××××××.xt. This file can be viewed directly, and it contains information such as the running time of the function, parameter values ​​of the function call, return value, file and location, etc. The content format is relatively intuitive.
The file name format of the performance monitoring file: cachegrind.out.××××××××.
This file can also be viewed directly, but the information format is not easy for humans to understand,
so we need the next software.
2. Install wincachegrind
Since the content of the performance monitoring file: cachegrind.out.×××××××× file is not easy to be understood by humans, we need a tool to read it. There is such a software under windows: wincachegrind.
1. Go to http://sourceforge.net/projects/wincachegrind/ to download and install wincachegrind
2. After installation and running, click Tools->options and set your working folder (xdebug. in php.ini. profiler_output_dir value)
In this way, you can view the information of the performance monitoring file more intuitively.

http://www.bkjia.com/PHPjc/322065.html

truehttp: //www.bkjia.com/PHPjc/322065.htmlTechArticle1. Download the XDebug binary file: http://www.xdebug.org/download.php 5.2 http:/ /www.xdebug.org/files/php_xdebug-2.1.0-5.2-vc6.dll 5.3 http://www.xdebug.org/files/php_xdebug-2.1.0-5.3...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn