You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using an [override](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files) file named `docker-compose.debug.yml` ensures that the production
26
27
configuration remains untouched.
27
28
28
-
As example, an override could look like this:
29
+
As an example, an override could look like this:
29
30
30
31
```yaml
31
32
# docker-compose.debug.yml
@@ -47,9 +48,12 @@ services:
47
48
# This should correspond to the server declared in PHPStorm `Preferences | Languages & Frameworks | PHP | Servers`
48
49
# Then PHPStorm will use the corresponding path mappings
49
50
PHP_IDE_CONFIG: serverName=symfony
51
+
extra_hosts:
52
+
# Ensure that host.docker.internal is correctly defined on Linux
53
+
- host.docker.internal:host-gateway
50
54
```
51
55
52
-
Build your image with your fresh new xdebug configuration:
56
+
Build your image with your fresh new XDebug configuration:
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).
67
71
68
-
If you don't want to use it, just add on your request this query param: `XDEBUG_SESSION=PHPSTORM`.
72
+
If you don't want to use it, add on your request this query param: `XDEBUG_SESSION=PHPSTORM`.
69
73
70
-
On PHPStorm, you just have to click on the button `Start Listening for PHP Debug Connections`on the `Run` menu.
74
+
On PHPStorm, click on `Start Listening for PHP Debug Connections`in the `Run` menu.
71
75
72
76
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:
73
77
74
78
* Server:
75
-
* Name: **symfony** (must be the same as defined in *PHP_IDE_CONFIG*)
76
-
* Host: **https://localhost** (or the one defined with *SERVER_NAME*)
77
-
* Port: **443**
78
-
* Debugger: **Xdebug**
79
-
* Absolute path on the server: **/srv/app**
80
-
* IDE key: **PHPSTORM**
79
+
* Name: `symfony` (must be the same as defined in `PHP_IDE_CONFIG`)
80
+
* Host: `https://localhost` (or the one defined with `SERVER_NAME`)
81
+
* Port: `443`
82
+
* Debugger: `Xdebug`
83
+
* Absolute path on the server: `/srv/app`
84
+
* IDE key: `PHPSTORM`
81
85
82
86
You can now use the debugger.
83
87
84
88
## Troubleshooting
85
89
86
-
Inspect the installation with the following command. The requested Xdebug version should be displayed in the output.
90
+
Inspect the installation with the following command. The Xdebug version should be displayed.
0 commit comments