I am trying to make Xdebug work for Docker container on Windows with PhpStorm. I read different articles and other threads, but still it's not working.
Inside docker-compose.yaml I have following configuration for my app container:
version: "3.7"
services:
#PHP Service
app:
build:
args:
user: user
uid: 1000
context: ./
dockerfile: docker/php/Dockerfile
image: rpg
container_name: rpg-app
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
PHP_IDE_CONFIG: serverName=RpgServer
working_dir: /var/www
command: /var/www/docker/php/application-init.sh
volumes:
- ./:/var/www
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- rpg-app-network
depends_on:
- db
...
#Nginx Service
nginx:
image: nginx:1.17-alpine
container_name: rpg-nginx
restart: unless-stopped
tty: true
ports:
- "8080:80"
- "443:443"
volumes:
- ./:/var/www
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
networks:
- rpg-app-network
depends_on:
- app
Using phpinfo() I get following php configuration:

And I have the following PhpStorm configuration:
DBGp Proxy (Don't really think is relevant)

I use Chrome's Xdebug Helper plugin to send the session key

And in phpinfo() I can see that the PHP receives the Xdebug session key:
I am listening in the PhpStorm for Xdebug connection (with breakpoints throughout the code):

I run the application in the browser with Xdebug Helper enabled .
Yet. There is no blocking you would expect from breakpoints and no callback to PhpStorm.
If I try to use Debugger Configuration validation in PhpStorm I get the following:










phpinfo()output captured via browser 3) Enable Xdebug log, try to debug and share the resulting log. P.S. Yes, you do not need DBGp Proxy (it's not needed for your setup at all .. and I have huge doubts that you have installed the needed proxy software at all) - LazyOnephpinfo()there -- this is to ensure that it is definitely served by the right server (check your ENV variables there to ensure about that). The reason I'm saying all this: Xdebug v3 uses different config params than v2. All important config params from v2 do nothing in v3. - LazyOne