Xdebug profiler: only dump on PHP memory limit

38 views Asked by At

Is it possible to only have Xdebug dump profile information when PHP hits a memory limit?

I don't see any settings to support this, similar to what php-memprof does with dump_on_limit.

1

There are 1 answers

0
Derick On BEST ANSWER

This is not possible with Xdebug's current architecture. When the profiler is enabled, Xdebug writes the information to a file while it is being run. It needs to collect the data regardless.

The feature that you're asking for, is basically an automated deletion of the generated file if the memory limit has not been hit.