Skip to content

Xdebug on Devilbox (aggregated thread) #946

@cytopia

Description

@cytopia

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

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.

⚠️ Note: This requires 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 from 9000 to 9003
  • 2023-01-05: Changed xdebug.discover_client_host from 0 to false
  • 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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions