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.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
I couldn't get profiling work with Xdebug in Eclipse either.
However, you don't really need Eclipse for profiling, it has little or no value. Once you turn on the profiling in xdebug, all the debug information is dumped in a temp directory and you can just view it using any tools (I prefer webgrind).
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:
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:
Nothing is sacred when it comes to bugs it seems :)
Set
xdebug.auto_profile = 1
in yourphp.ini
file.