• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Zend Studio 中使用调试PHP程序 (chrome)

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

一、下载Xdebug helper 

二、将crt文件添加到chrome浏览器的扩展应用程序中。Xdebug helper 选项中IED key默认就可以了,其他IDE请另外选择。



三、在php.ini中做添加如下配置,需先把php_xdebug-2.5.4-5.5-vc11-x86_64.dll包下载放入php的ext目录下

[XDebug]
;以下是参数
zend_extension = "php安装目录\ext\php_xdebug-2.5.4-5.5-vc11-x86_64.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
;开启自动跟踪
xdebug.auto_trace=1
;开启异常跟踪
xdebug.show_exception_trace=1
;开启远程调试自动启动
xdebug.remote_autostart=off
;开启远程调试
xdebug.remote_enable=1
xdebug.collect_params=On
xdebug.collect_return=On
;设定函数调用监测信息的输出文件的路径。
xdebug.trace_output_dir="C:\Apache24\php5\xdebug"
;打开效能监测器。
xdebug.profiler_enable=On  
;设定效能监测信息输出文件的路径。
xdebug.profiler_output_dir="C:\Apache24\php5\xdebug" 
;用于zend studio远程调试的应用层通信协议
xdebug.remote_handler=dbgp 
;允许连接的zend studio的IP地址
xdebug.remote_host=127.0.0.1 
;反向连接zend studio使用的端口
xdebug.remote_port=9000 
;收集变量
xdebug.collect_vars = On 
 ;收集返回值
xdebug.collect_return = On
;收集参数
xdebug.collect_params = On 

xdebugbug.max_nesting_level = 10000 ;如果设得太小,函数中有递归调用自身次数太多时会报超过最大嵌套数错

四、zend studio中添加Xdebug ,添加方法请看其他博文,把window->preference->PHP->Debug下的Break at first选项去掉,不然每次都在调试页面开始地方停止,很忧伤!在window->preference->PHP->Debug-Debuger中配置Xdebug的Accept remote session 为localhost 保存。

五、点击chrome浏览器下的爬虫图标,切换到Debug,在zend studio中找个PHP文件随便设置断点后,浏览器访问该文件即可开始调试。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP遍历指定目录,并存储目录内所有文件属性信息发布时间:2022-07-10
下一篇:
php7使用curl发布时间:2022-07-10
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap