Profiling PHP Applications with XDEBUG

Modify your php.ini file with:

xdebug.profiler_enable_trigger=1

My php.ini was at /Applications/MAMP PRO/MAMP PRO.app/Contents/Resources/phpX.XX.ini

From now on, any process that you want to profile, you can append &XDEBUG_PROFILE to the URL when running in localhost.

Once your request is complete, your cachegrind file is in /Applications/MAMP Pro/temp/

you can open them via command line with qcachegrind [cachegrind file]

Posted November 17, 2014 at 2:41PM