Configuration and description of php xdebug

Source: Internet
Author: User
1. install xdebug Module 1. go to www.xdebug.org to download the php module file of the corresponding version. Save the downloaded file to the php ext Directory. you can modify the file name by yourself, for example, save it: php_xdebug.dll2, modify php. ini, add the following information. at the end of the file, [Xdebug] zend_extension_ts & quot; c: php5extphp_xdebug 1. install the xdebug module.

1. go to www.xdebug.org to download the php module file of the corresponding version, save the downloaded file to the php ext directory, and modify the file name by yourself, for example, save it as php_xdebug.dll.

2. modify php. ini and add the following information at the end of the file.

[Xdebug]

Zend_extension_ts = "c:/php5/ext/php_xdebug.dll"

Xdebug. auto_trace = On

Xdebug. collect_params = On

Xdebug. collect_return = On

Xdebug. trace_output_dir = "c:/php5/debuginfo"

Xdebug. profiler_enable = On

Xdebug. profiler_output_dir = "c:/php5/debuginfo"

Debuginfo is disgusting. you need to create a directory to generate the file. Otherwise, the file will not be generated.

Parameter description:

Zend_extension_ts = "c:/webserver/php5/ext/php_xdebug.dll"

Load the xdebug module. You cannot use the extension = php_xdebug.dll method to load the file. you must use the zend method to load the file. otherwise, phpinfo cannot display the xdebug item after installation.

Xdebug. auto_trace = on;

Automatically enable the "Monitor function call process" module. This function outputs the monitoring information of function calls in a file in the specified directory. The default value of this configuration item is off.

Xdebug. collect_params = on;

To enable the function of collecting "function parameters. Include the parameter values of function calls in the monitoring information of function process calls. The default value of this configuration item is off.

Xdebug. collect_return = on

; Enable the function to collect "function return values. Include the return value of a function in the monitoring information of function call. The default value of this configuration item is off.

Xdebug. trace_output_dir = "c: Tempxdebug"

Set the path of the output file of the function call monitoring information.

Xdebug. profiler_enable = on

; Enable the Performance Monitor.

Xdebug. profiler_output_dir = "c: Tempxdebug ";

Set the path of the output file of performance monitoring information.

There are some more specific parameter settings, see: php "> 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 is trace. ×××××. xt. This file can be viewed directly. it contains information such as the function running time, function call parameter value, return value, and file and location. The content format is relatively intuitive.

File name format of the performance monitoring File: cachegrind. out. ×××××××.

This file can also be viewed directly, but the information format is not easily understood by humans,

So we need the next software.


II. install wincachegrind

Because the content of the performance monitoring file cachegrind. out. ×××××××× is not easily understood by humans, we need a tool to read it. Windows has such a software: wincachegrind.

12 Next page

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.