I have the following Xdebug config:
xdebug.mode=develop
xdebug.start_with_request=true
xdebug.client_host=docker.for.mac.localhost
xdebug.client_port=9003
xdebug.discover_client_host=false
xdebug.idekey=PHPSTORM
xdebug.trigger_value=""
xdebug.cli_color=1
xdebug.var_display_max_depth=-1
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
When doing composer update there will be a call to cache:clear command that will hang. It will work only if -dxdebug.mode=off (or xdebug.mode=off in .ini file).
I can do work-around in composer.json:
from
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
}
},
to
"scripts": {
"auto-scripts": {
"-dxdebug.mode=off bin/console cache:clear": "php-script",
}
},
But now if I run some random command (e.g. bin/console make:entity that needs container re-build then Xdebug will be still turned on and command will hang on same cache build process.