4

Is there any way to limit cachegrind files (xdebug profiling output)? I would like to enable xdebug.profile for debugging whole project (not only trigger), but if someone forget to disable it, I don't want disc to be full.

I didn't find any option like that in the profiler documentation.

tshepang
  • 12,111
  • 21
  • 91
  • 136
yulka
  • 61
  • 6

1 Answers1

4

As the documentation states ( http://www.xdebug.org/docs/profiler ) use these settings in your appropriate .ini file - :

xdebug.profiler_enable = 0 
xdebug.profiler_enable_trigger = 1

Then rather than every single request being profiled, only those with an XDEBUG_PROFILE variable in GET/POST/COOKIE will be profiled.

If you don't want to use the trigger approach, then I suppose you'd need a cron job (or similar) to clean up /tmp (or whatever xdebug.profiler_output_dir is set to) quite frequently.

David Goodwin
  • 4,184
  • 1
  • 22
  • 12