-
-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xdebug on Devilbox (aggregated thread) #946
Comments
Hi @cytopia Devilbox v3.0.0-beta-0.3 (2023-01-02) OS: Ubuntu 22.04 Xdebug 3 My configs project/.vscode/launch.json
|
Found mistakes in issue readme: is: file: ./cfg-php-ini-X.Y/devilbox-php.ini -> should be: file: ./cfg/php-ini-X.Y/devilbox-php.ini is: file: ./cfg-php-fpm-X.Y/devilbox-php.conf (copy devilbox-php.conf-default) -> should be: file: ./cfg/php-fpm-X.Y/devilbox-fpm.conf (copy devilbox-fpm.conf-default) |
Hi @cytopia, Devilbox v3.0.0-beta-0.3 (2023-01-06) OS: KUbuntu 22.04 Xdebug 3 Did all your recommended configuration. xdebug running fine ( as did before with devilbox 2.2). But in contao/isotope webshop I now get HTTP Code 503 on a side where the products shall be listed (having for now < 20 products). If I delete my xdebug.ini, the side works well. I also have this ini:
I also asked in the contao community Here also first part of my launch.json:
|
I will check if it is easily possible to make PHP-FPM able to reload configuration files instead of having to restart all container for changes to take effect. |
Sorry, I am not keen with how to use the multi php feature. Tried to configue as described in the release notes, but not quite sure what it does and how it works. Also unclear: in .env I select one (1) php version? Will this be overwritten by the bind option at startup? In my case not. |
Well, I configured it correctly now, I think. Working fine. Great job, @cytopia! So f.i. I configured php8.2 in the .env and started devilbox with bind option php74: Just one feature request remaining: |
This information is shown in the vhost panel already. This will do, I think. |
Devilbox v3.0.0-beta-0.3 (2023-01-06) OS: Fedora 36 to get it working I have had to change the xdebug.client_host as follows:
|
I am on WSL2 Windows 11 PHPSTORM windows firewall is disabled. The following works, mainly this change: Is there a better way to do this? This was after a lot of troubleshooting. php.ini:
|
@salesigniter Thank you, this was the only way I could get this to work on WSL2 Windows 10 using PHPSTORM as well. |
@salesigniter Thank you. Your input helped me as well. Just had to adjust the client_host IP. I wasn't able to get it working with https://devilbox-test.readthedocs.io/en/stable/tutorials/enable-xdebug.html?highlight=xdebug#required-for-all-os Devilbox v3.0.0-beta-0.3 (2023-01-06) OS: Windows 10 |
@salesigniter: I was able to use host.docker.internal for the client_host instead of the IP xdebug.client_host = host.docker.internal |
@salesigniter Thanks ============================= OS: windows 11 with WSL2 Docker for desktop 4.17.1 ====================
============================= ln -s wordpress.git htdocs code for xdebug must NOT be running from a symbolic link. ==================== ====================
======================== VSCODE
============================
======================== Xdebug works now. |
regarding
In my setup I am able to use symbolic links: I have separated the projects from the htdocs since I am not using a flat folder structure like devilbox requires for the htdoc folders. I am running
Where I was stuck for many hours when I switched from Docker Desktop for Windows to Docker on Ubuntu was the Windows firewall that would not let requests through to PhpStorm. But now, I am able to use xDebug with symbolic links. xdebug.mode = debug I hope this helps. |
hi all ! i see that with devilbox this is possible so i ask: |
hi @cirolosapio-accenture, what have you tried so far? I am using WSL 2 with Linux Docker and devilbox and it's working on my end with PHPStorm (which is running on Windows and not in WSL). |
@dokmaister you have NOT docker desktop installed? that's what i mean i've created a repro |
correct, I am using docker within WSL, NOT Docker Desktop. However, I have not tried xdebug WITHOUT devilbox and therefore not experience without. Looking at your xdebug.ini you might need to add client host and port as well. It took me days until I had it running and I have not found another solution that with the hard coded IP of my windows machine. This means I have to update the IP whenever I am in a different network. xdebug.mode = debug ; How to connect ; Logging ; IDE Configuration max_input_time = 0 |
i have client_host and client_port setted, i only removed from the repro that repro works on the wsl managed by docker desktop |
Hi @cytopia, Devilbox v3.0.0-beta-0.4 Xdebug 3
; Defaults
xdebug.mode = debug
xdebug.remote_handler = dbgp
xdebug.start_with_request = yes
; xdebug.start_with_request = trigger
; xdebug.trigger_value = randomkey
; How to connect
xdebug.client_port = 9003
xdebug.client_host = docker.for.lin.host.internal
; xdebug.client_host = host.docker.internal
xdebug.discover_client_host = 0
; Logging
xdebug.log = /var/log/php/xdebug.log
xdebug.log_level = 7
; IDE Configuration
xdebug.idekey = PHPSTORM
; xdebug.idekey = VSCODE |
Hello, I understand that this is not the place to propose this, but it seems to me that it is the only place to do this that will have a quick view of the contributors and maintainers. As an end user, I wouldn't want to have to come to github, clone I don't know what... and execute I don't know what commands... instead as a Windows user I would like an .exe (executable) to do everything necessary ... that and at the end of the installation, it opens the url: http://localhost. If this can be implemented then if you consider that it is a "zero-config" project... put some things in the executable:
|
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.
Devilbox v3.0.0-beta-0.3
or laterThe currently suggested Xdebug
php.ini
configuration for PHP 7.2 and above is as follows:file:
./cfg/php-ini-X.Y/devilbox-php.ini
Adding these two might also help:
file:
./cfg/php-fpm-X.Y/devilbox-fpm.conf
(copydevilbox-fpm.conf-default
)Updates to the above config:
xdebug.client_port
from9000
to9003
xdebug.discover_client_host
from0
tofalse
Next Steps
We need confirmation for the following host operating system setups:
And for the following IDE's
If Xdebug is working for you, please post the configuration in here as well as the OS and your IDE.
The text was updated successfully, but these errors were encountered: