PHP添加Xdebug扩展的方法_PHP

WBOY
Release: 2016-06-01 11:57:06
Original
721 people have browsed it

一、下载对应的DLL

二、把文件放在PHP安装目录下的ext文件夹中

三、修改php.ini
复制代码 代码如下:
[Xdebug]
zend_extension="./ext/php_xdebug-2.2.3-5.3-vc9-nts.dll"
;以下是参数
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.trace_output_dir="./xdebug"
xdebug.profiler_enable=on
xdebug.profiler_output_dir="./xdebug"

注意:

xdebug.trace_output_dir="./xdebug" 配置是把调试文件放在PHP安装目录下的xdebug文件夹中,所以要在PHP安装目录下新建xdebug文件夹

xdebug.profiler_output_dir="./xdebug" 配置是把调试文件放在所运行项目下的xdebug文件夹中,所以要在项目目录下新建xdebug文件夹

测试

新建php文件
复制代码 代码如下:
testXdebug();
function testXdebug() {
require_once('abc.php');
}
?>

运行查看php安装目录下的xdebug文件夹中是否生成文件,生成文件则安装成功

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!