Zend Studio 调试Zend Debugger和XDebug

安装Zend Debugger

下载

http://downloads.zend.com/pdt/server-debugger下载最新的debugger

下载后将zip解压缩。得到一个目录:有x_x_x_compx_x_x_nts_compx指版本号,phpinfo查看php版本和thread safe属性,

配置

1、请将ZendDebugger.dll复制到您的php安装目录下,比如:php根目录/ext/

2、然后将下面的4行内容加到您的php.ini

[Zend]

zend_extension_ts=C:/wamp/bin/php/php5.xxx/ZendDebugger.dll

;zend_extension=C:/wamp/bin/php/php5.xxx/ZendDebugger.dll


;也可以在ZEND STUDIO window -- preferences -- PHP server中设置;

;同时到Project -- propertites中设置 PHP Debug Server Setting 中选择已创建的SERVER

zend_debugger.allow_hosts=127.0.0.1 

zend_debugger.expose_remotely=always

其中,127.0.0.1是远程调试的文件所在机器的IP;我是本地web调试

3、将dummy.php复制到apachedocument root目录。

4、重启apache

5.Zend StudioTools->preferences->debug下核对一下设置是正确的

6.测试Debugger是否成功

 


 

问题:Test Debugger报错


“A timeout occurred when the debug server attempter to connect to the following client hosts/IPS”

php版本是5.3以上,且是thread safe的,改用XDebug

 

The Debugger we provide supports only the non-thread-safe architecture, that is why it does not load in your configuration.
Zend stopped supporting the thread safe architecture when Microsoft also decided to implement its PHP engine with the fast-cgi architecture which means non-thread-safe.
Best regards,
Massi.

 

 

任务:XDebug安装

 

http://xdebug.org/download.php选择需要的xdebug版本。

下载并解压到需要的位置。

php.ini php5.4之前中加入

zend_extension_ts="你的php根目录/ext/php_xdebug.dll"

php5.4之后改用

zend_extension="你的php根目录/ext/php_xdebug.dll"

然后重启apache通过phpinfo()输出并查找xdebug是否被成功加载。

问题:XDebug无法进入断点

php.ini中加入

;开启自动跟踪

xdebug.auto_trace = On

;开启异常跟踪

xdebug.show_exception_trace = On

;开启远程调试自动启动,所有PHP访问将自启动调试

xdebug.remote_autostart = On

;开启远程调试

xdebug.remote_enable = On

;收集变量

xdebug.collect_vars = On

;收集返回值

xdebug.collect_return = On

;收集参数

xdebug.collect_params = On

xdebug.trace_output_dir="e:/php7/temp"

xdebug.profiler_enable=On

xdebug.profiler_output_dir=" e:/php7/temp"

 

;可选项,也可在Zend studio / window /preperences / Server 设置

xdebug.remote_host=localhost  ;设置 localhost

xdebug.remote_port=9000       ;设置默认9000,只要端口未被使用

xdebug.remote_handler=dbgp

 重启apache



Zend Studio v13 添加 调试服务器

Window-Preferences-PHP-Servers










--- 调试 ---

如果之前调试过某个文件,先切换到Debug视图,删除相应的调试记录,切换回Recource视图,

右键点击要调试的文档,debug as , 修改url,如使用urlrewrite 则填入正确的地址提交






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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值