If you’re a PHP developer working with xdebug ( which you should be ), I cannot recommend Webgrind enough.
The current release is 0.6 and is being developed under Google’s summer of code program. If you are running XAMPPon Windows, read the rest of this article for some tips on getting Webgrind to run properly.
XAMPP user’s may experience some problems trying to get Webgrind to run properly. This is due to the php.ini settings and the location of the ini file itself. I’ve used the following setup and it works great:
- Download Webgrind and install it to C:\path\to\xampp\webgrind
- Create a tmp/ directory under the webgrind/ directory
- Open C:\path\to\xampp\apache\conf\httpd.conf and add
Listen 81to the Apache Listen section - Save file, open C:\path\to\xampp\apache\conf\extra\httpd-vhosts.conf and add the following virtual host:
- Save file, now open C:\path\to\xampp\apache\bin\php.ini and change the xdebug.profiler_output_dir to:
xdebug.profiler_output_dir="C:\xampp\webgrind\tmp" - Save file, and copy it to C:\path\to\xampp\php\php.ini
- Restart web server
- Visit http://localhost:81/ to view your profiler.
<VirtualHost *:81>
ServerAdmin name@company.com
DocumentRoot "C:/xampp/webgrind"
ServerName localhost:81
ServerAlias localhost:81
<Directory "C:/xampp/webgrind">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</VirtualHost>
Depending on the size of your PHP application, webgrind may crash apache while trying to build the cachegrind output. Simply tweak your xdebug settings in the php.ini file, or the memory/threading options available in apache.

Subscribe to TehDevs!