warden: Xdebug 3 and PHP 8.1 - not working
When running a brand new install on Magento 2 using the below conifg, xdebug fails to break.
ELASTICSEARCH_VERSION=7.17 MARIADB_VERSION=10.4 NODE_VERSION=16 COMPOSER_VERSION=2 PHP_VERSION=8.1 PHP_XDEBUG_3=1 RABBITMQ_VERSION=3.9 REDIS_VERSION=6.2 VARNISH_VERSION=7.0
When downgrading the PHP version to 7.4 then the breakpoints work correct without changing any other config settings in the IDE.
This makes me believe it’s a 8.1 Image specific problem, debugging is out my remit but hopefully someone can shed some light.
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[164] [Config] INFO: No shared secret: Activating
[164] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] INFO: Checking header 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: localhost:9003.
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', connect: Cannot assign requested address.
[164] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port).
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[164] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[164] [Config] INFO: No shared secret: Activating
[164] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] INFO: Checking header 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: localhost:9003.
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', connect: Cannot assign requested address.
[164] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port).
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[164] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[164] [Config] INFO: No shared secret: Activating
[164] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] INFO: Checking header 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: localhost:9003.
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', connect: Cannot assign requested address.
[164] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port).
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[164] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[164] [Config] INFO: No shared secret: Activating
[164] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] INFO: Checking header 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: localhost:9003.
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', connect: Cannot assign requested address.
[164] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port).
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[164] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[164] [Config] INFO: No shared secret: Activating
[164] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] INFO: Checking header 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: localhost:9003.
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', connect: Cannot assign requested address.
[164] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port).
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[164] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[164] [Config] INFO: No shared secret: Activating
[164] [Step Debug] INFO: Checking for client discovery headers: 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] INFO: Checking header 'HTTP_X_DEBUG_HOST'.
[164] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: localhost:9003.
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', poll success, but error: Operation now in progress (29).
[164] [Step Debug] WARN: Creating socket for 'localhost:9003', connect: Cannot assign requested address.
[164] [Step Debug] ERR: Could not connect to debugging client. Tried: localhost:9003 (fallback through xdebug.client_host/xdebug.client_port).
[164] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[164] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[164] Log closed at 2022-12-25 23:07:23.224448
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (12 by maintainers)
Commits related to this issue
- Import fix from wardenenv/warden#568 — committed to swiftotter/den by navarr a year ago
I have tested this on Ubuntu 22.04 on a PHP 8.1 project:
warden env pull && warden env up.Aaaannddd… It works again! Thanks to everyone involved fixing this!
In case it’s useful, the following should be able to be used to gather the gateway IP from within any running container without requiring additional packages:
Seemed interesting that this only affects PHP 8.1, but not PHP 7.4, so I took a look through Xdebug update notes and found this:
The last comment on that bug tracker reads:
Considering the documentation on the feature hasn’t changed to reflect this, could be a bug. Or it could be a miss on updating docs to reflect the BC break. I’d suggest reporting this issue upstream, as it does seem like an unintended change to me.
Since XDebug 3.2 dropped support for 7.4, the PHP 7.4 images are running XDebug 3.1 or 3.0 and thus unaffected by the behavior change.
On Ubuntu 22.04.1 on a PHP 8.1 M2 project:
And the respective
$_SERVERvalues: