您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

有哪些 PHP 调试技巧?

2024/6/1 16:33:25发布42次查看
回复内容:我目前遇到的最让我称赞的debug方式是:xdebug的
xdebug_start_trace();/* 业务代码 */xdebug_stop_trace();
1、最简单经典的var_dump()
2、配置error_log,能够解决很多疑难杂症
3、firebug + firephp或者chrome + chromephpphp调试指南:http://heiyeluren-doc.googlecode.com/files/php-debug-manual-public.pdf
挺薄的一个册子,讲的不错。xhprof 吧,
facebook开源出来的神器,php轻量级调试工具,可在生产环境中使用。
1. inclusive time :包括子函数所有执行时间。
2. exclusive time/self time:函数执行本身花费的时间,不包括子树执行时间。
3. wall time:花去了的时间或挂钟时间。
4. cpu time:用户耗的时间+内核耗的时间
5.inclusive cpu:包括子函数一起所占用的cpu
6.exclusive cpu:函数自身所占用的cpu 我比较喜欢笨方法print_r + exit来调试代码。php 5.6 新增 phpdbg,使用方法上类似于gdb。
官方货.gdb xdebugxdebug可以结合;ide 进行断点调试
phpstrom+xdebug + chrome(debug helper) or ff (easy xdebug)macgdbp xdebug chromephp
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product