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.ini for xdebug 3 / php 8.1 #4

Open
herberlin opened this issue Dec 29, 2022 · 0 comments
Open

xdebug.ini for xdebug 3 / php 8.1 #4

herberlin opened this issue Dec 29, 2022 · 0 comments

Comments

@herberlin
Copy link

Images using xdebug 3 must use the new configuration parameters as said in the xdebug configuration; for me the following file worked fine:

xdebug.ini

zend_extension=xdebug
[xdebug]
xdebug.mode=develop,debug
xdebug.client_host=host.docker.internal
xdebug.start_with_request=yes

When working with docker compose you'll need a so called extra_host - mapping for the internal gateway. Working for me:

docker-compose.yml

  php:
    container_name: apache_php
    # image: mobtitude/php-xdebug:8.1-apache
    build: docker/apache2/build
    ports:
      - 8080:80
      - 9001:9003
    volumes:
      [...]
    extra_hosts:
      - host.docker.internal:host-gateway

In the docker/apache2/build I placed your Dockerfile and the xdebug.ini as shown above.

Thank you very much for sharing and
cheers
Achim

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

No branches or pull requests

1 participant