Zend Studio配置xdebug进行调试

平时不需要的时候,最好关闭xdebug!否则会使web访问超慢!

1.我的php版本是5.3.3

下载相应的xdebug扩展php_xdebug.dll放到php/ext/下

xdebug版本2.1.1
 
不知道下载具体哪个版本可以把phpinfo()源代码粘贴到以下网址进行检测。
 
2.修改php.ini文件并重启apache服务
 
[Xdebug]
;开启自动跟踪
xdebug.auto_trace = On
 
;开启异常跟踪
xdebug.show_exception_trace = On
 
;收集变量
xdebug.collect_vars = On
 
;收集返回值
xdebug.collect_return = On
 
;收集参数
xdebug.collect_params = On
zend_extension=D:\wamp\bin\php\php5.3.3\ext\php_xdebug.dll
xdebug.profiler_enable=on
xdebug.trace_output_dir="/workspace/xdebuginfo/xdebug"
xdebug.profiler_output_dir="/workspace/xdebuginfo/xdebug"
 
;开启远程调试自动启动
xdebug.remote_autostart = On
 
;开启远程调试 Xdebug允许远程IDE连接
xdebug.remote_enable = On
 
xdebug.remote_host=192.168.1.200
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
 
3.查看xdebug是否配置成功。phpinfo()里,可以找到相应扩展说明配置成功。
 
4.最后配置Zend Studio
1)Window->Preferences->PHP Executable->Add如下:

 

2)设为Default如下:

 

3)Debug设置如下:

 

4)新Local PHP Project并增加断点如下:

 

 

5)右键Debug Configurations设置如下:

 

到此为止即可:Debug As PHP CLI Application和PHP Web Application进行断点调试了。

 
posted @ 2017-02-06 16:29  帽子戏法  阅读(274)  评论(0编辑  收藏  举报
全部 html css js Linux php MySQL seo web git other 联系 管理