-
-
Notifications
You must be signed in to change notification settings - Fork 659
Description
Currently the Xdebug questions are separated in too many different issues, which makes it difficult to track. Let's consolidate them in here:
Currently open Xdebug issues
These will be locked, but still contain good information
- [Docs]: Add XDebug configuration info for WSL2 Support #929
- file devilbox-php.ini-xdebug not suitable for xdebug 3 #866
- Why does xdebug fall off? How to fix? #841
- About configuring VSCode to interpret php #628
- xDebug Documentation #575
- Xdebug 3.0 with PHP 7.2, 7.3, 7.4 and 8.0 #769
Discord
Specific discussions can also be done in Discord.
Status
The documentation lacks behind and can not be updated at the momemnt as I don't have all the bits and pieces together. Let's find some common ground, so we can get this out of the way once and for all.
Devilbox v3.0.0-beta-0.3
or later
The currently suggested Xdebug php.ini
configuration for PHP 7.2 and above is as follows:
file: ./cfg/php-ini-X.Y/devilbox-php.ini
[PHP]
; Defaults
xdebug.mode = debug
xdebug.remote_handler = dbgp
xdebug.start_with_request = yes
; How to connect
xdebug.client_port = 9003
xdebug.client_host = host.docker.internal
xdebug.discover_client_host = false
; Logging
xdebug.log = /var/log/php/xdebug.log
xdebug.log_level = 7
; IDE Configuration
xdebug.idekey = PHPSTORM
;xdebug.idekey = VSCODE
Adding these two might also help:
; https://www.php.net/manual/en/info.configuration.php#ini.max-input-time
; https://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
max_input_time = 0
max_execution_time = 0
file: ./cfg/php-fpm-X.Y/devilbox-fpm.conf
(copy devilbox-fpm.conf-default
)
...
[www]
; https://www.php.net/manual/en/install.fpm.configuration.php
request_terminate_timeout = 0
...
Updates to the above config:
- 2023-01-05: Changed
xdebug.client_port
from9000
to9003
- 2023-01-05: Changed
xdebug.discover_client_host
from0
tofalse
- 2023-01-06: Fixed typos in filename (thanks @Ernestopheles)
Next Steps
We need confirmation for the following host operating system setups:
- Linux
- MacOS
- Windows (with WSL2)
- Windows (without WSL2)
And for the following IDE's
- PhpStorm
- VSCode
- Sublime
If Xdebug is working for you, please post the configuration in here as well as the OS and your IDE.