Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Provide instructions for Linux users to replace xdebug hostname config w/correct IP #7400

Closed
@carlos-reynosa

Description

@carlos-reynosa

General issue

Xdebug session does not start in Linux with given instructions.

Description:

Xdebug session does not start because host.docker.internal is not available on Linux. Docs should provide special instructions for Linux users to replace xdebug hostname configuration with a correct IP.

Possible solutions:

In order to configure xdebug correctly for Linux the remote hostname within the docker-compose.yml configuration should not use host.docker.internal and be replaced with the results of running the following command:

docker run --rm alpine ip route | awk 'NR==1 {print $3}'

Example xdebug configuration should result in:

  generic:
    image: alpine
    environment:
      - PHP_MEMORY_LIMIT=2048M
      - UPLOAD_MAX_FILESIZE=64M
      - MAGENTO_ROOT=/app
      - PHP_IDE_CONFIG=serverName=magento_cloud_docker
      - XDEBUG_CONFIG=remote_host=172.17.0.1

Additional information:

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions