docs: Xdebug on symfony commands
This commit is contained in:
parent
45eda5e683
commit
d25e7d6359
@ -24,6 +24,7 @@ First, [create a PHP debug remote server configuration](https://www.jetbrains.co
|
||||
|
||||
1. In the `Settings/Preferences` dialog, go to `PHP | Servers`
|
||||
2. Create a new server:
|
||||
* Name: `symfony` (or whatever you want to use for the variable `PHP_IDE_CONFIG`)
|
||||
* Host: `localhost` (or the one defined using the `SERVER_NAME` environment variable)
|
||||
* Port: `443`
|
||||
* Debugger: `Xdebug`
|
||||
@ -37,6 +38,14 @@ You can now use the debugger!
|
||||
|
||||
Alternatively, you can use [the **Xdebug extension**](https://xdebug.org/docs/step_debug#browser-extensions) for your preferred web browser.
|
||||
|
||||
3. On command line, we might need to tell PHPStorm which [path mapping configuration](https://www.jetbrains.com/help/phpstorm/zero-configuration-debugging-cli.html#configure-path-mappings) should be used, set the value of the PHP_IDE_CONFIG environment variable to `serverName=symfony`, where `symfony` is the name of the debug server configured higher.
|
||||
|
||||
Example:
|
||||
|
||||
```console
|
||||
XDEBUG_SESSION=1 PHP_IDE_CONFIG="serverName=symfony" php bin/console ...
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Inspect the installation with the following command. The Xdebug version should be displayed.
|
||||
@ -45,5 +54,5 @@ Inspect the installation with the following command. The Xdebug version should b
|
||||
$ docker compose exec php php --version
|
||||
|
||||
PHP ...
|
||||
with Xdebug v3.1.2 ...
|
||||
with Xdebug v3.x.x ...
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user