phpstorm xdebug go to the wrong line

I'm using xdeug/phpstrom for a long time and never saw this problem:

phpstorm 2019.1.3

docker 18.09.2

image mattrayner/lamp:latest-1804

PHP Version 7.3.3-1+ubuntu16.04.1+deb.sury.org+1

When I run debugger in phpstorm, the debugger breaks on the correct line but when I step through the code, it jumps to random places in the code, and the browser receive empty response, with no errors in the log.

More info:

* I have a similiar setup on the same machine with image mattrayner/lamp:latest-1604 - in this setup the problem does not reproduce

* If I set 'stop at first line' I can step through the code on the first, but subsequent run will not step though the code

  • when the debugger breaks, any operation will fail - e.g. clicking on run will finish the execution but the browser display empty response and no action executed after the break.

content of /etc/php/7.3/apache2/conf.d/20-xdebug.ini

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.remote_connect_back=0
xdebug.remote_host=host.docker.internal

Any idea how to solve it?

1 comment
Comment actions Permalink

Check if you can reproduce the issue on two simple PHP files calling each other in the same project.
Overall, it sounds like it's a caching issue, please turn OPcache and all other caching tools off.

0

Please sign in to leave a comment.