xdebug profiler on a per project basis?

is there a way to set the profiler_output_dir to output per domain?

right now on my local network remote dev machine i have many projects.

I would like to set the profiler output for the site to appear within the currently setup FTP area so i can download it from within PhpStorm via the "Remote Host" panel.

If I set the profiler_output_dir to a fixed location on the remote dev machine I have to go outside PhpStorm to transfer the profiler output back to my local machine to then run the profiler.  Hoping to avoid leaving PhpStorm.


Comment actions Permalink

Hello michael,

You can override 'xdebug.profiler_output_dir' in .htaccess file (so it possible configure it even for separate directory). Here is an example:

php_value xdebug.profiler_output_dir "C:\Users\Nikolay.Matveev\Temp\xdebug_profiler_output_dir\"

Thank you for feedback!

Comment actions Permalink

Thanks very much Nikolay, that sounds perfect.  :)

Comment actions Permalink


Does it work for you?

Thank you for feedback!

Comment actions Permalink

Don't know yet Nikolay sorry.

Im busy doing client work during the weekdays.  I will be able to try it out on my days off when I can work on my own stuff.  Ill let you know.

Comment actions Permalink

works perfectly.

Thanks Nikolay.

Went with:

php_value xdebug.profiler_enable 1
php_value xdebug.profiler_enable_trigger 1
php_value xdebug.profiler_output_name cachegrind.out.%u
php_value xdebug.profiler_output_dir "/var/www/vhosts/admin/jr500.iixxii.cc/httpdocs/data/logs/"

in the .htaccess file and on the next refresh in the browser an new file appeared. :)


Please sign in to leave a comment.