-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
My steps how i could debug the app:
First consideration: in phpdocker/php-fpm/php-ini-overrides.ini i set xdebug.remote_port to 9000 which is xdebugs default.
An other option would be to change the port in PhpStorms debug configuration.
How to start the app:
composer install
docker-compose up -d
- Open the app in the browser: http://localhost:8074/
- With a browser extension enable debugging.
- In PhpStorm open the project.
- In PhpStorm click "Start Listening for PHP debug connections".
- Reload the page in the browser.
- Now PhpStorm reacts and tells you that you should set up the server. If there is no reaction, check if your local IP as seen from the webserver container:
## open console in webserver and view your host IP
docker-compose exec webserver /bin/sh -c "/sbin/ip route|awk '/default/ { print \$3 }'"
Now take this IP and set it in docker-compose.yml as value XDEBUG_CONFIG. Then you have to stop your docker containers and start them with docker-compose up -d again. You have to use "up" because "start" does not handle the config change.
- Set the server name according to the one you have set as env var in docker-compose.yml. Als set the path mapping. The project root to /application is sufficient:

- Now you can debug the code:

- You can also set break points:

- Here a screenshot where you can change the xdebug port, if you want to listen to another one than 9000:

Metadata
Metadata
Assignees
Labels
No labels