PHP中的远程调试和内存分析 [英] Remote Debugging and Memory Profiling in PHP

查看:77
本文介绍了PHP中的远程调试和内存分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两个问题


  1. 如何远程调试位于服务器上的PHP代码,目前我我正在使用var_dump来检查变量的值吗?

  2. 我如何查看位于服务器上的远程执行某个特定功能需要花费多少内存和多少时间,对此是否有建议提供良好的分析器?

注意:我在说的是远程位于服务器上的代码。

Note: I am talking about code which is lying remotely on the Server.

推荐答案

就像其他人所说的那样, Xdebug 是最好的选择。我只是在这里打个招呼,并提到几个分析器。如果您使用的是Linux,则 KCacheGrind 不会出错,并且在Windows上会显示 WinCacheGrind 。我不知道可以使用远程配置,它会转储到您需要访问的文件中。虽然,看来您已经习惯了。

Like others said, Xdebug is your best bet. I'll just chime in here and mention a couple profilers. If you're on Linux you can't go wrong with KCacheGrind and on Windows it appears WinCacheGrind is what you'd use. I was not aware of remote profiling being an option, it dumps to a file which you'd need to have access to. Although, it appears you are accustomed to that already.

Komodo 是一个非常不错的IDE,具有Xdebug支持(调试需要付费版本),尽管没有理由不仅仅安装 Eclipse ,然后选择 Zend PDT

Komodo is a pretty nice IDE with Xdebug support (debug requires paid version), although there is no reason to not just install Eclipse and pick up the Zend PDT.

我的建议是,使用 Python 编程,并成为一名更快乐的开发人员(更多开发人员友好的模块/工具):P

My suggestion, program in Python and be a happier developer (more developer-friendly modules/tools) :P

这篇关于PHP中的远程调试和内存分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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