I need Xdebug to keep track of incoming data, where it goes, etc.
Since I run(raise up) the Drupal site using docksal, I set it up according to the instructions Xdebug :: Docksal Documentation
I wrote the command:
fin config set --env=local XDEBUG_ENABLED=1
And in the file docksal-local.env changed to:
XDEBUG_ENABLED="1"
I wrote the command:
fin project start
I checked xdebug:
fin exec php-v | grep -i xdebug
And received:
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
In the index.php file, I put a breakpoint on some line
I clicked the Start Listening for PHP Debug Connections button
I went to the site page in the browser, updated it and returned to PhpStorm
But nothing happened. What do I need to do to make Xdebug work?
I used it on Mac, this is why I used host.docker.internal as remote host. You need to set it to a valid IP on the host which is accessible from the container.
This is my xdebug configuration in PHPStorm (I used Port 9000 and 9003 for compatibility reasons)