I am debugging PHP 5.2(i know it's old) with PHPStorm 2016.2,
however when i add auto_prepend_file or auto_append_file in my apache vhost file:
php_value auto_prepend_file /home/abc/def/apache_prepend.php
php_value auto_append_file /home/abc/def/apache_append.php
xdebug breaks.
The IDE stops at the first breakpoint then the debugging stops when i try to step over/in/out and the browser returns "no data received".
My xdebug.conf file:
#[xdebug]
php_value xdebug.remote_enable on
#php_value xdebug.default_enable on
php_value xdebug.remote_autostart off
php_value xdebug.remote_port 9000
php_value xdebug.remote_host 192.168.100.66
php_value xdebug.profiler_enable 0
php_value xdebug.profiler_enable_trigger 1
php_value xdebug.profiler_output_name cachegrind.out-%H-%R-%t
php_value xdebug.profiler_output_dir /home/abc/xdebug-profile
php_value xdebug.trace_enable_trigger 1
#php_value xdebug.auto_trace off
php_value xdebug.trace_output_name trace.out-%H-%R-%t
php_value xdebug.trace_format 1
php_value xdebug.idekey PHPSTORM
The solution was to move the xdebug.conf at the end of the apache virtual host like this
SetEnv ENVIRONMENT dev
php_value auto_prepend_file /home/abc/prepends/apache_prepend.php
php_value auto_append_file /home/abc/apache_append.php
#INCLUDE XDEBUG AT THE END
Include /home/abc/projects/hello/site/vhosts/xdebug_notrace.conf
</VirtualHost>
p.s. Later i figured out that php_value xdebug.auto_trace off also fixed this bug without changing apache vhost.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With