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

PHP message: Xdebug: [Step Debug] Could not connect to debugging client. #485

Closed
vhb-Mark opened this issue Oct 13, 2023 · 1 comment · Fixed by #486
Closed

PHP message: Xdebug: [Step Debug] Could not connect to debugging client. #485

vhb-Mark opened this issue Oct 13, 2023 · 1 comment · Fixed by #486

Comments

@vhb-Mark
Copy link

Hi all,

I followed the steps on the xdebug.md but as soon as I start the project with Xdebug my log is spammed with the following:
NOTICE: PHP message: Xdebug: [Step Debug] Could not connect to debugging client. Tried: 172.21.0.1:9003 (through xdebug.client_host/xdebug.client_port, from xdebug://gateway)

Did I forgot something?

With kind regards

@bkosun
Copy link
Contributor

bkosun commented Oct 15, 2023

Hello!

It looks like you have one of the unsuccessful use cases:
xdebug/xdebug#833 (comment)

This error appeared after the PR #461 merge. As you can see from the draft, xdebug://gateway is still not well tested:
https://docs.google.com/document/d/1W-NzNtExf5C4eOu3rRQm1WlWnbW44u3ANDDA49d3FD4

To fix this bug, use xdebug.client_host = host.docker.internal instead of xdebug.client_host = xdebug://gateway

https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host

As far as I understand, the previous configuration method worked regardless of the platform:

; See https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
; See https://github.com/docker/for-linux/issues/264

- host.docker.internal:host-gateway

Official guide to setting up Xdebug 3 + Docker + PHPStorm from the author of Xdebug:
https://www.youtube.com/watch?v=4opFac50Vwo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants