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.
/var/www/vhosts/admin/somesite.com/httpdocs/profiler_output
/var/www/vhosts/admin/different-site.com/httpdocs/profiler_output
/var/www/vhosts/admin/yet-another-site.com/httpdocs/profiler_output
/var/www/vhosts/admin/some-other-site.com/httpdocs/profiler_output

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.

Possible?

6 comments
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:

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


Thank you for feedback!

0
Comment actions Permalink

Thanks very much Nikolay, that sounds perfect.  :)

0
Comment actions Permalink

michael,

Does it work for you?

Thank you for feedback!

0
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.

0
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. :)

0

Please sign in to leave a comment.