简体   繁体   中英

Apache 2 + Xdebug + PHP 7.2 on Ubuntu 18.04 not working

I am not able to step through my code. It works fine in 16.04. I dual boot into 18.04 and configured Apache 2 , Xdebug , PHP 7.2 the same way but I cannot seem to stop at any of my break points.

The debugger stops ONE TIME at the first line (as that is how I have it configured in NetBeans 8.2 ). After that the debugger never breaks again. I disabled opcache to see if that was interfering but it didn't seem to help.

Note that if I debug a PHP-CLI application then Xdebug works fine. It seems to be an Apache 2 related configuration issue and I cannot seem to determine why.

Here is my 20-xdebug.ini file:

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
#xdebug.remote_log="/tmp/xdebug.log"
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300

Argh!!!!

Found the issue. For some reason my browser had cookies disabled therefore XDEBUG could not store its cookie thus all subsequent calls back to the web application from the browser were not processed via XDEBUG.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM