No way to make xdebug work on docker in vs-code

  docker, php, visual-studio-code, xdebug

I’m trying to make work xdebug on docker. I tried everything I found on the web but it doesn’t work. The server works correct, but visual studio code never stops on the breakpoints, I’m using this docker-compose

version: '3'

services:
    app:
        container_name: php7.3_xdebug3
        image:  'php7.3-xdebug-i'
        ports: 
            - '9090:80'
        build:
            context: ./
        volumes:
            - ./:/var/www/html
        environment:
            XDEBUG_CONFIG: zend_extension=xdebug.so mode=debug start_with_request=yes client_host=host.docker.internal

Any suggestions?

Source: Ask PHP

LEAVE A COMMENT