Windows xdebug Manual Configuration and usage instructions _php tips

Source: Internet
Author: User
Tags phpinfo zend

1. Download 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 you have configured Zendoptimizer, you need to first shield the Zendoptimizer-related configuration, usually as follows:
[Zend]
Zend_extension_manager.optimizer_ts= "path\zendoptimizer-3.3.0\lib\optimizer-3.3.0"
Zend_extension_ts= "Path\zendoptimizer-3.3.0\lib\zendextensionmanager.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= "Path\xdebug"
Xdebug.profiler_output_dir= "Path\xdebug"
Xdebug.remote_enable=on
Xdebug.remote_handler=dbgp
Xdebug.remote_host=localhost
xdebug.remote_port=9000
Description: The place above "path" needs to be modified for your own local path.
5. Restart Apache or IIS.
6. View the output of the phpinfo, if you see the XDebug option, it indicates that the configuration was successful.
Here are some other netizens ' articles
First, install Xdebug module
1, to www.xdebug.org download the corresponding version of PHP module files, save the downloaded file to the PHP ext directory, you can modify the name of the file, such as Save into: Php_xdebug.dll
2, modify php.ini, add the following information

Copy Code code 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. Here can not be loaded in a extension=php_xdebug.dll way, must be loaded in Zend way, otherwise installed on the phpinfo is not shown xdebug this item.
Xdebug.auto_trace=on;
To automatically open the "Monitoring function call process" of the work mode. This feature 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"
The path of the output file that sets the monitoring information for the function call.
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
3, restart Apache
In this way, when you run PHP locally, you will generate some debugging information files in the directory you set up:
Function call procedure monitoring information file filename format: trace.xxxxxx.xt. This file can be viewed directly, which contains information such as the time the function was run, the parameter value of the function call, the return value, the file and location in which it was located. The content format is still relatively intuitive.
The file name format of the effectiveness monitoring document: Cachegrind.out.xxxxxxxx.
This file can also be viewed directly, but the information format is not easily understood by humans,
So we need the next software.
Second, install Wincachegrind
Due to the effectiveness monitoring document: The content of the Cachegrind.out.xxxxxxxx file is not easily understood by humans, so we need a tool to read it. Windows has one such software: Wincachegrind.
1, to http://sourceforge.net/projects/wincachegrind/download installation Wincachegrind
2, after installation and operation, click Tools->options, set your working folder (php.ini Xdebug.profiler_output_dir value)
This allows for a more intuitive view of the performance monitoring file information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.