-
-
Notifications
You must be signed in to change notification settings - Fork 654
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 3.0 with PHP 7.2, 7.3, 7.4 and 8.0 #769
Comments
One fixes on my previous report : We MUST use Otherwise we will get an error like this one :
|
Final settings suggestion could be :
|
i've made this change too (on a windows machine) and i confirm too that the port should be 9000 and not 9003
|
@llaville For the PHP-FPM images I added the following sane defaults: ; Ensure to disable everything by default (be in sync with Xdebug v2)
xdebug.mode = Off
xdebug.start_with_request = Off
xdebug.client_port = 9000 |
@cytopia sorry but i'm not agree with setting I suggest to put |
@jonatanaxe you could use any Docker image before this version: https://github.com/devilbox/docker-php-fpm/releases/tag/0.118 |
this worked for me on w10 plus setting defaults on PHPSTORM as on docs. |
Quick question, because this has also been an issue for me: When loaded the PHP image has fpm expecting connections to port 9000. Wouldn't that conflict with Xdebug 3? I use PHP Tools from Devsense, and they also state that debugging should be on port 9000. I was wondering if the PHP-FPM service could be "configurable", so to speak, to allow port changes when necessary. What @llaville mentioned earlier, about the error of port 9003, I had that same issue and I have to ask, are you using WSL2 for the Linux backend? I found that if you install php on the linux wsl instance, so that, for example, Visual Studio Code can load any php extension that requires the language server, xdebug from Devilbox will actually attempt to make the connection that way. I found that an easy edit of the xdebug conf file to add the line |
|
Once this is set, it worked for me. |
@dereuromark were you able to find a dynamic approach for this? I am running Docker on Windows with WSL2 backend and also running PhpStorm within WSL and would love to find a way to automate this. |
@ParhamG I don't think you need to set xdebug.client_host if you use the suggestion settings and Xdebug helper Chomre plugin. |
I had to point Xdebug to the docker gateway for it to work:
|
I tried both 9000 and 9003 ports and got same error messages from Xdebug:
IP address in the message is the same as in I'm absolutely devastated and desperate and would appreciate any help you can provide. |
@antyblin Your docker gateway might be different. Try setting
Test again after |
Oh my god, it works! Thank you so much for the response! I've been struggling with this problem for a long time. |
Add for bind & php services
xdebug.ini
Working for me :) Thank all. |
Hi, After a day of research, I would have to deactivate the firewall.
solution disable the firewall sudo ufw disable |
hi all ! i see that with devilbox this is possible so i ask: |
ISSUE TYPE
SUMMARY
Migrate from old to new settings.
Goal
Xdebug v3 is a new major version that changed a lot especially on behavior and settings.
See the Xdebug Official Upgrade Guide
Following changes that were started with FR #746, Devilbox need again to be clean-up !
While I've started to introduced OPCache settings in a custom
php.ini
config file, I found that old settings from Xdebug v2 are still mentioned in default config files. Look at :I suggest to remove these settings, and only used default provided by extension itself and other settings set in devilbox-php.ini-xdebug files
BTW, these files must be fixed as I've already said (#746 (comment))
I recommand to use these default settings :
See Official Upgrade Guide
And especially to use mode =
off
by default, because even with xdebug 3.0.1 it consume more time and memory.A little benchmark I've run on one of my CLI script took :
Fatal error with xdebug.mode = debug100% 6 secs 251.5 MiB with xdebug_mode = debug and client_port = 9000The text was updated successfully, but these errors were encountered: