Answer the question
In order to leave comments, you need to log in
How to setup phpstorm + xdebug + docker?
Tell me, please, what is the error? xdebug doesn't stop at breakpoints, it doesn't see them at all.
Dockerfile
FROM php:7.1-apache
RUN apt-get update &&\
apt-get install --no-install-recommends --assume-yes --quiet ca-certificates curl git &&\
rm -rf /var/lib/apt/lists/*
RUN pecl install xdebug && docker-php-ext-enable xdebug
COPY php.ini /usr/local/etc/php/
version: "3.6"
services:
app:
build: ./.docker
ports:
- "80:80"
volumes:
- ./src:/var/www/html
[xdebug]
zend_extension=xdebug.so
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.idekey=docker
xdebug.remote_host=172.18.0.2
Answer the question
In order to leave comments, you need to log in
Works for me with these settings:
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=0
xdebug.cli_color=0
xdebug.profiler_enable=0
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.remote_host=host.docker.internal
xdebug.idekey=PHPSTORM
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question