PHP调试与断点 - 案例研究,示例..? [英] PHP Debugging with Breakpoints - case studies, examples..?

查看:170
本文介绍了PHP调试与断点 - 案例研究,示例..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很想深入我的php脚本,并使用像断点这样的东西,就像我用firebug的JS一样。



我想了解更多关于人们使用的技术,以及一些关于如何使用断点调试php项目的实例。



我想要看到..




  • 属性的对象

  • 对象来自的类层次结构,文件名等(在ZF / Magento中有用)

  • 变量,类型,

  • 标题,发布数据,获取数据,会话数据,cookies ..

  • 网络/文件系统状态..



我知道很多这可以用日志记录和print_r / vardump等完成,但它有点生气..我想要能够使用继续/step-over等命令点击一个断点后的代码,如firebug。



从php.ini:

  zend_extension_ts = c:\wamp\bin\php\php5.2.11\ext\php_xdebug-2.1.0-5.2- vc6.dll; 
xdebug.remote_enable =开;
xdebug.remote_host =localhost;
xdebug.remote_port = 9000;
xdebug.remote_handler =dbgp;


解决方案

xdebug +远程调试+支持的客户端之一


I'd really like to get deeper into my php scripts and use things like breakpoints, as I'm doing with JS with firebug.

I'd like to know more about what techniques people use, and some solid examples of how to debug with breakpoints a php project.

Thing's I'd like to be able to see..

  • Properties of objects
  • Class hierarchies.. where objects are coming from, file names etc.. (useful in ZF/Magento)
  • Variables, types, content..
  • headers, post data, get data, session data, cookies..
  • Network / filesystem status..

I know a lot of this can be done with logging and print_r/vardump etc, but its a bit raw.. and I'd like to be able to use a "continue"/"step-over" etc command on code after hitting a breakpoint, like with firebug.

from php.ini:

zend_extension_ts = c:\wamp\bin\php\php5.2.11\ext\php_xdebug-2.1.0-5.2-vc6.dll;
xdebug.remote_enable=On;
xdebug.remote_host="localhost";
xdebug.remote_port=9000;
xdebug.remote_handler="dbgp";

解决方案

xdebug + remote debugging + one of the supported clients

这篇关于PHP调试与断点 - 案例研究,示例..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆