Categories
PHP Workflow

Xdebug Profiling

Installed xdebug with pecl install xdebug.

Enabled in extra .ini config file in:

/usr/local/etc/php/7.2/conf.d

Restart PHP with:

brew services restart php72

The webcachegrind script does not seem to work. It lists only a few of the cache files, and they often do not match their description. For example the filename will appear to be webcachegrinds own PHP script, but all the data relates to a different WordPress script. Out of sync with the requests.

Might need a different tool like QCachegrind.

Currently cachegrind files are in /private/var/tmp

Categories
PHP

Xdebug Profiling with Qcachegrind

Enable xdebug profiling temporarily while you profile. You’ll kill a ton of disk space if you leave it on.

Install qcachegrind from homebrew (brew install qcachegrind)

By default cachegrind output files go to /var/tmp (I think).

Move somewhere useful. Open qcachegrind to read this file. It’s in:
/usr/local/Cellar/qcachegrind/18.04.1

Spotlight didn’t find it, so maybe create a symlink or something elsewhere.