messy
messy

Reputation: 915

XDebug: Windows + Docker + PHPStorm

My OS is Windows 10. I've run Docker via the boot2docker image. IDE I use is PHPStorm. What I want to do is debug with XDebug, but I don't get it running. I searched the Web and tried the examples I found but nothing helps. Is there anyone with the same architecture who can help me?

Edit: Nginx ist running on the server.

Current setup: xdebug.ini

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=0
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey=PhpStorm

PhpStorm server Host is same IP I connect for SSH. Path mappings is enabled. Debugger is Xdebug I tried already with a specific DBPg Proxy but no success

Upvotes: 2

Views: 3500

Answers (3)

Tinywan
Tinywan

Reputation: 31

php.ini

[XDebug]
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
; Set to host.docker.internal on Mac and Windows, otherwise, set to host real ip
xdebug.remote_host = host.docker.internal
xdebug.remote_port = 9000
xdebug.remote_log = /var/log/php/xdebug.log

Upvotes: 1

Elia Weiss
Elia Weiss

Reputation: 9896

I used the following setting in ini file:

xdebug.remote_connect_back=0
xdebug.remote_host=host.docker.internal

Upvotes: 0

messy
messy

Reputation: 915

I got it. I just forgot to forward the port. I've to run the container via docker run -d -p 80:80 -p 9000:9000 -v /mnt/www/foo:/var/www/foo foo.

Upvotes: 4

Related Questions