`
guoyiqi
  • 浏览: 961948 次
社区版块
存档分类
最新评论

Windows 下 PHP 开发环境配置系列三 - eclipse PDT + Zend Debugger 调试web 项目

 
阅读更多

基本安装参考

http://blog.csdn.net/oscar999/article/details/6713666

此部分只是介绍如何在PDT 下如何使用Zend Debugger .php 的web 文件


1. 解压下载的Zend Debugger压缩档。

1.1) 把5_2_x_comp下的ZendDebugger.dll拷到php安装目录(例如 D:\php。 根据php的安装版本使用对应的ZendDebugger版本)

1.2) 把dummy.php拷到网站根目录下面(例如: D:\apache2\htdocs)


2. 打开php.ini,在文件的最后面加上

[Zend Debugger]
zend_extension_ts="D:/php/ZendDebugger.dll"
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=allowed_hosts


说明: zend_debugger.allow_hosts最好使用机器的IP地址(可以在cmd 在使用ipconfig /all 查看)


以上Zend debugger安装完成,可以通过phpinfo函数查看是否安装成功。

新建phpinfo.php 文件放在网站目录下,重启web server. 访问这个文件

如果找到以下内容, 就说明安装成功了 (需贴图)

ZendEnginev2.2.0,Copyright(c)1998-2010ZendTechnologies
withZendDebuggerv5.2.15,Copyright(c)1999-2008,byZendTechnologies


接下来就是如何在eclipse 中调试了


1. 点击bug 图标,选Debug Configurations

2. 双击 PHP Web Page--> New_configuration

3. 点configure... 配置正确的IP和端口

4. 选需要debug 的File

5. 点击Test Debugger, 出现 "success"弹出框说明成功了。

6. F6 进行调试

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics