Skip to content

Update Xdebug configuration instructions for Linux to support Docker 20.10+ #9887

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

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

niels-numbers
Copy link
Contributor

This PR addresses the issues discussed in this thread regarding the Linux Host IP Configuration for Xdebug in the Laravel documentation.

Why the change is necessary:

  • Docker 20.10+: As outlined in the merge request, host.docker.internal became available on Linux starting with Docker 20.10. This means Linux users no longer need to manually configure the host IP, simplifying Xdebug configuration.

  • Incorrect Documentation for Docker 17.06+: The previous documentation incorrectly suggested that Docker 17.06.0+ would resolve the issue for Linux users, but host.docker.internal was not supported on Linux until Docker 20.10. Users still had to manually set the host IP even with Docker 17.x.

  • Pre-Docker 20.10: For older Docker versions, the current suggestion to use docker inspect to find the IP is impractical. Each time the container restarts, the IP changes, so users would need both "foreteller skills" to predict the new IP and manually update it each time—which is cumbersome and error-prone.

By configuring a static IP in docker-compose.yml, this PR ensures a consistent setup for older Docker versions, while also helping users on modern Docker versions avoid getting lost in a complicated setup they no longer need.

These changes correct outdated instructions and simplify the process for Linux users across different Docker versions, offering a more reliable and user-friendly Xdebug setup.

Clarified Linux Xdebug setup. For Docker 20.10+, host.docker.internal works without manual config. For older versions, added instructions to set a static IP in docker-compose.yml.
@taylorotwell taylorotwell merged commit 9ad603d into laravel:11.x Sep 10, 2024
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 this pull request may close these issues.

2 participants