docs: add a section for xdebug in PHPStorm (#160)

This commit is contained in:
Abdouni Abdelkarim 2021-06-18 18:47:46 +02:00 committed by GitHub
parent 35519d553b
commit a1a9ceb254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,12 +49,27 @@ services:
PHP_IDE_CONFIG: serverName=symfony
```
Build your image with your fresh new xdebug configuration:
```console
docker-compose -f docker-compose.yml -f docker-compose.debug.yml build
```
Then run:
```console
docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d
```
## Debug with Xdebug with PHPStorm
You can use the [xdebug extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc) if you want to debug on the browser (don't forget to configure it).
If you don't want to use it, just add on your request this query param: `XDEBUG_SESSION=PHPSTORM`.
On PHPStorm, you just have to click on the button `Start Listening for PHP Debug Connections` on the `Run` menu.
You can now use the debugger.
## Troubleshooting
Inspect the installation with the following command. The requested Xdebug version should be displayed in the output.