KeywordsConfiguration and description of PHP Xdebug
First, install the Xdebug module
1, go to www.xdebug.org download the corresponding version of the PHP module file, save the downloaded file to the PHP ext directory, you can modify the name of the file, such as Save as: Php_xdebug.dll
2, modify the php.ini, add the following information, at the end of the document
[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 more disgusting, you need to set up a good directory to generate files, otherwise it will not be generated.
; load the Xdebug module. Here can not be loaded with Extension=php_xdebug.dll way, it must be loaded in a zend way, or after installation, Phpinfo is not shown xdebug this item.
Xdebug.auto_trace=on;
Automatically turn on the "monitor function call process" mode. This function can output the monitoring information of a function call as a file in the directory you specify. The default value for this configuration item is off.
Xdebug.collect_params=on;
Open the function that collects "function parameters". The parameter values of the function call are included in the monitoring information for the Function procedure call. The default value for this configuration item is off.
Xdebug.collect_return=on
Open the function that collects the function return value. The return value of the function is included in the monitoring information of the Function procedure call. The default value for this configuration item is off.
Xdebug.trace_output_dir= "C:tempxdebug"
; Sets the path of the output file for the function call monitoring information.
Xdebug.profiler_enable=on
; Open the Performance Monitor.
Xdebug.profiler_output_dir= "C:tempxdebug";
Set the path of the performance monitoring information output file.
There are some more specific parameter settings, see: PHP ">http://www.xdebug.org/docs-settings.php
3. Restart Apache
This way, when you run PHP locally, you will generate some debugging information in the directory you set:
function call process monitoring information file filename format: trace.xxxxxx.xt. This file can be viewed directly, containing information such as the time the function was run, the parameter value of the function call, the return value, the file and location. The content format is still relatively straightforward.
File name format for performance monitoring files: 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, installation Wincachegrind
Because the performance monitoring file: The contents of the Cachegrind.out.xxxxxxxx file are not easily understood by humans, we need a tool to read it. There is a software like this in Windows: Wincachegrind.
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.