如何在Eclipse上设置PHP概要分析? [英] How do I set up PHP profiling on Eclipse?

查看:167
本文介绍了如何在Eclipse上设置PHP概要分析?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Galileo上设置了Eclipse PDT。我可以运行和调试在XAMPP上设置的PHP站点。事情是,我想要介绍一个网站,但不能为我的生活找出如何设置这一点。当我右键单击PHP项目时,有一个分析菜单,但没有指示如何从那里进行。 BTW我正在使用Xdebug作为调试引擎。

解决方案

我遇到了解决我的真正问题:获取Xdebug输出分析文件。正如@ZZ Coder所说,你并不需要Eclipse来配置PHP。我检查了Xdebug源文件,并意识到您在选项(php.ini)中提供的文件名格式得到验证,并确定是否打开概要分析。现在这并不奇怪,但有趣的是php.ini(附XAMPP 1.7.2)文件已经有Xdebug选项:

  xdebug.profiler_output_name =xdebug_profile。%R ::%u

在Windows上,由于两个冒号,此输出文件名格式无效,因此该选项无法验证,并且概要分析未打开。我将其编辑为下面的格式,并且分析开始按预期工作:

  xdebug.profiler_output_name =xdebug_profile。%R- u

对于错误,似乎没有什么是神圣的:)


I have set up Eclipse PDT on Galileo. I'm able to run and debug PHP sites that are set up on XAMPP. The thing is, I want to profile one of the sites, but cannot for the life of me figure out how to set this up. There is a profiling menu when I right-click the PHP project, but no indication of how to proceed from there. BTW I'm using Xdebug as the debug engine.

解决方案

I came across the solution to my real problem: Getting Xdebug to output profiling files. As @"ZZ Coder" has mentioned, you don't really need Eclipse to profile PHP. I checked the Xdebug source files and realized that the filename format that you supply in the options (php.ini) gets validated and determines whether the profiling is turned on or not. Now this is not surprising, but what's interesting is that the php.ini (supplied with XAMPP 1.7.2) file already had the Xdebug option:

xdebug.profiler_output_name = "xdebug_profile.%R::%u"

On Windows, this output filename format is invalid due to the two colons so the option fails validation and profiling is not turned on. I edited this to the format below and the profiling started working as expected:

xdebug.profiler_output_name = "xdebug_profile.%R-%u"

Nothing is sacred when it comes to bugs it seems :)

这篇关于如何在Eclipse上设置PHP概要分析?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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