I use xDebug 2.5.5 on a Windows 7 machine running Apache 2.4 and PHP 5.6. xDebug profiler works ok except when I use a php auto_prepend_file
in php.ini
auto_prepend_file = "C:\path\to\init.php"
or in Apache Vhost
php_value auto_prepend_file "C:\path\to\init.php"
In either case, adding this directive will cause the generated profiler snapshot cachegrind.out.####, to be corrupted somehow. I cannot open it either in PhpStorm (my IDE) or using WinCacheGrind. In addition, I cannot delete the snapshot until I kill the Apache process
WinCacheGrind error
Access violation at address 004A5908 in module 'WinCacheGrind.exe'.
Read of address 00000000
PhpStorm error
Incorrect Profiler snapshot format: Incorrect name format
Any advice?
PS: I voted to close my earlier issue that was misslabeled b/c I thought my problem had to do with PhpStorm not xDebug
来源:https://stackoverflow.com/questions/45261449/php-auto-prepend-file-causes-xdebug-profiler-to-fail