![]() In docker-compose.yml add the following to your environment: -%%. export XDEBUG_CONFIG="remote_enable=1 remote_host=" In your dockercontainer, put the address in the command underneath and execute it on the Docker container running PHPUnit / behat / CLI. Get the ip-address of the host running your IDE like PHPStorm. "serverName=Docker" Export $XDEBUG_CONFIG $ docker exec -it dev bash -c 'echo $PHP_IDE_CONFIG' Windows:Įxport PHP_IDE_CONFIG="serverName=Docker" Where ‘Docker’ is the name you gave to the server configured at ‘ Settings / Preferences | Languages & Frameworks | PHP | Servers’ in the step above. This variable will tell PHPStorm which server to use from its configuration for debugging. In your docker container, export the PHP_IDE_CONFIG variable. ![]() You do this by creating the server in Settings / Preferences | Languages & Frameworks | PHP | Servers. Xdebug.remote_host => => localhost Set path mappings in PHPStormįirst you need to create a server and set the path mappings for your Docker container. $ docker exec -it dev bash -lc "$VARS php -i | egrep 'xdebug.remote_host|xdebug.remote_enable'" Not working? Then check whether everything came through. $ docker exec -it dev bash -lc "$VARS vendor/bin/phpunit" $ VARS="XDEBUG_CONFIG=\"remote_enable=1 remote_host=\" PHP_IDE_CONFIG=\"serverName=Docker\"" Set the needed variables and execute your application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |