Skip to content
Advertisement

Docker toolbox Xdebug not working with PhpStorm

I tried all the tutorials I found on the internet and still can’t use a simple break point in PhpStorm using docker toolbox…

I currently have this inside my Dockerfile:

JavaScript

Xdebug gets installed and configured correctly (php -i output):

JavaScript

In my PhpStorm configuration I have the following:

Proxy:

DBGp Proxy

Debug Debug

PHP interpreter PHP interpreter

Debug config Debug config

Server configuration Server config

The blurred items are Username and project name.

I have 2 folders in a project, one called docker and holds all the docker files and one site, that holds all the site files.

The configuration for my docker-compose is the following:

JavaScript

Anyone a clue on what I’m doing wrong here?

When I try to de telnet 192.168.99.100 9001, the connection can’t be made, port 9000, neither, but port 80 gives me a good response.

Anyone who has an idea what’s going on here?

Advertisement

Answer

Xdebug needs to open a connection to PhpStorm. You don’t need the ports exposed in Docker, or do anything with the Xdebug proxy. The telnet needs to be done from within your docker container to PhpStorm. The IP address in xdebug.remote_host, needs to be the IP address of your IDE, and not the IP address of your docker container (where HTTP/Apache listens on port 80).

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement