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

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

Any idea how to solve it?

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.

Comment actions Permalink

We were just affected by this exact issue. Try removing all variables you have in the Watches section of the debug tools. When it hits the breakpoint again, if the watched variables appear, remove all of them again. There is some sort of issue with a variable I was watching that caused the debugger/phpstorm to go mad.


Please sign in to leave a comment.