netbeans-xdebug配置

听说NetBeans安装xdebug插件之后,可以调试php程序,怎么配置呢?再网上查找了半天,终于搞清楚了,

1、先编写个index.php页面,代码如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body> <?php // put your code here phpinfo(); ?> </body> </html>

2、在http://xdebug.org/find-binary.php 中粘贴index.php中phpinfo()信息

3、点击按钮,将得到类似如下的提示信息:

Instructions

  1. Download php_xdebug-2.1.0-5.3-vc9.dll
  2. Move the downloaded file to D:/php/ext
  3. Edit C:/WINDOWS/php.ini and add the line
    zend_extension = D:/php/ext/php_xdebug-2.1.0-5.3-vc9.dll
  4. Restart the webserver

根据提示下载你所需要的dll,放到指定目录下,然后重启web服务器,就可以调试程序了。

根据php.ini文件配置大致如下所示:

zend_extension = D:/php/ext/php_xdebug-2.1.0-5.3-vc9.dll
[Xdebug]
xdebug.default_enable=on
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.max_nesting_level=100
xdebug.profiler_enable=on
xdebug.remote_enable=on
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
;设置xdebug输出文件,主要是纪录一些函数调用所花费的时间
xdebug.trace_output_dir="D:/php/xdebug"
xdebug.profiler_output_dir="D:/php/xdebug"

参考:

http://xdebug.org/find-binary.php

http://xdebug.org/

http://xdebug.org/download.php

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值