XDebug profiler is incorporated in the XDebug tool. Therefore you first need to download, install, and enable XDebug itself and after that enable the profiling functionality within it.
To enable profiling with XDebug, perform these general steps:
- Configure the XDebug tool
- Enable the XDebug profiler
- Enable toggling the profiler from the browser
- Specify the location for storing accumulated profiling data
- Open the active php.ini file.
Define location for accumulating profiling snapshots by specifying the xdebug.profiler_output_dir directive.
xdebug.profiler_output_dir = "<output folder name>"
Specify the name of the file to store snapshots in through the value of the xdebug.trace_output_name directive.
The default name is cachegrind.out.%p, where %p is the name format specifier. Accept the default name or
define a custom one in compliance with the following standard:
- The name should always be cachegrind.out.
- Use the supported format specifiers.