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 https://docs.docksal.io/tools/xdebug/#phpstorm
- 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?
2
Answers
For xdebug 3 add environment variables for cli:
See https://github.com/docksal/docksal/issues/1450#issuecomment-812889179
In my case, as indicated @Hamrant it works, it is only necessary to keep in mind to restart the Docksal service so that it takes the changes.