From 9d192405e001d802a9cd65dffdb5758345f660fa Mon Sep 17 00:00:00 2001 From: Romain Monteil Date: Wed, 23 Jun 2021 10:36:31 +0200 Subject: [PATCH] docs: Improve Xdebug configuration documentation with PHPStorm (#162) --- docs/xdebug.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/xdebug.md b/docs/xdebug.md index d8c6d42..986f9f6 100644 --- a/docs/xdebug.md +++ b/docs/xdebug.md @@ -61,13 +61,24 @@ Then run: docker-compose -f docker-compose.yml -f docker-compose.debug.yml up -d ``` -## Debug with Xdebug with PHPStorm +## Debugging with Xdebug and PHPStorm + +You can use the **Xdebug extension** for [Chrome](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc) or [Firefox](https://addons.mozilla.org/fr/firefox/addon/xdebug-helper-for-firefox/) if you want to debug on the browser (don't forget to configure it). -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. +Otherwise, you can create a [PHP Remote Debug](https://www.jetbrains.com/help/phpstorm/creating-a-php-debug-server-configuration.html) configuration with the following parameters: + +* Server: + * Name: **symfony** (must be the same as defined in *PHP_IDE_CONFIG*) + * Host: **https://localhost** (or the one defined with *SERVER_NAME*) + * Port: **443** + * Debugger: **Xdebug** + * Absolute path on the server: **/srv/app** +* IDE key: **PHPSTORM** + You can now use the debugger. ## Troubleshooting