The following assumes that you are using apiopenstudio_docker_dev.
The dockerfile is configured toi create a build from php:n.n-fpm
,
and you can enable the build to include the xDebug packages using a simple
environment variable,
Turn on Xdebug in .env
in your checkout of
apiopenstudio_docker_dev:
WITH_XDEBUG=true
Rebuild your docker containers
docker-compose build
Or
docker-compose up -d --build
In PhpStorm, go to PhpStorm -> Preferences -> PHP -> Debug.
This is how PHPStorm will map the local file paths to the ones in your container.
Go to File -> Settings -> PHP -> Servers
Give a name to the server. It should be a recognisable name, so you can identify it later, i.e. "apiopenstudio".
Ensure you have "Use path mappings" checked, and edit the RHS to
/var/www/html/api
.
Click "Apply" to save your configurations.
Depending on how you have set up your projects, and you have admin in a separate project, you will also need to set up servers as above, for your admin project.
The remote paty mapping will be /var/www/html/admin
.