From a1a9ceb2549fef4042720a90439578bb7be48818 Mon Sep 17 00:00:00 2001 From: Abdouni Abdelkarim Date: Fri, 18 Jun 2021 18:47:46 +0200 Subject: [PATCH] docs: add a section for xdebug in PHPStorm (#160) --- docs/xdebug.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/xdebug.md b/docs/xdebug.md index 42e2c0a..d8c6d42 100644 --- a/docs/xdebug.md +++ b/docs/xdebug.md @@ -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.