Skip to content
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 does not work on M1 Mac #16

Open
noahott opened this issue Dec 2, 2021 · 4 comments
Open

Xdebug does not work on M1 Mac #16

noahott opened this issue Dec 2, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@noahott
Copy link
Sponsor

noahott commented Dec 2, 2021

I cannot get Xdebug to work on an M1 Mac. The same configuration works without any issues on an Intel Mac running the same version of macOS, 12.0.1.

This can be reproduced by starting a new environment with the default wordpress or drupal9 recipes and adding xdebug: true to .lando.yml. I have confirmed that xdebug is active, but my debugger cannot connect. If I specify a custom php.ini file that enables xdebug logging, i see:

[208] [Step Debug] INFO: Checking remote connect back address.
[208] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[208] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 172.20.0.1:9003.
[208] [Step Debug] WARN: Creating socket for '172.20.0.1:9003', poll success, but error: Operation now in progress (29).
[208] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: host.docker.internal:9003. :-|
[208] [Step Debug] WARN: Creating socket for 'host.docker.internal:9003', getaddrinfo: Invalid argument.
[208] [Step Debug] ERR: Could not connect to debugging client. Tried: 172.20.0.1:9003 (from HTTP_X_FORWARDED_FOR HTTP header), host.docker.internal:9003 (fallback through xdebug.client_host/xdebug.client_port) :-(

I've also tried reverting to xdebug 2 and the same issues occur.

@rtfm-47 rtfm-47 transferred this issue from lando/lando Jan 5, 2022
@labboy0276 labboy0276 added bug Something isn't working and removed Needs Triage labels Jan 5, 2022
@officialsuyogdixit
Copy link

Same thing.
[741] Log opened at 2022-01-30 11:47:46.789635
[741] [Step Debug] INFO: Checking remote connect back address.
[741] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[741] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[741] [Step Debug] WARN: Could not discover client host through HTTP headers, connecting to configured address/port: host.docker.internal:9003. :-|
[741] [Step Debug] WARN: Creating socket for 'host.docker.internal:9003', poll success, but error: Operation now in progress (29).
[741] [Step Debug] ERR: Could not connect to debugging client. Tried: host.docker.internal:9003 (fallback through xdebug.client_host/xdebug.client_port) :-(
[741] Log closed at 2022-01-30 11:47:46.926018

@seutje
Copy link

seutje commented May 16, 2022

Getting a similar issue on WSL, tried multiple different ports.
[3842] [Step Debug] WARN: Creating socket for 'host.docker.internal:9027', getaddrinfo: Invalid argument.
[3842] [Step Debug] ERR: Could not connect to debugging client. Tried: host.docker.internal:9027 (through xdebug.client_host/xdebug.client_port) :-(

@lukastom
Copy link

Same thing here. Linux Mint 21.1. Could not connect to debugging client. Tried: 192.168.88.105:9003.

@noahott
Copy link
Sponsor Author

noahott commented Nov 6, 2023

Creating a new MacOS user account, then reinstalling Docker and Lando solved this issue and allowed me to use Xdebug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants