Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

How to debug using Xdebug #38

Closed
sanderpost opened this issue Feb 11, 2016 · 5 comments
Closed

How to debug using Xdebug #38

sanderpost opened this issue Feb 11, 2016 · 5 comments

Comments

@sanderpost
Copy link

Hi,

I ran into the following issue which I have resoved, but not in a satisfactory way.

I use Netbeans to start the debug client on port 9000. But since port 9000 is used by the docker-proxy process there's no way to have the xdebug to connect to my Netbeans debug client. How can I get xdebug to connect to my debugger client? It seems to me that IF you bind the host port 9000 to the container port 9000 there's no way to listen for the xdebug server "connect back".

I resolved the issue in the end by using net : "host" in the docker-compose file. This also requires me to drop the 'links' section which is pretty ugly imho.

Greetz,

Sander

@kasperisager
Copy link
Owner

It's been a long time since I've last used Xdebug so I'm afraid I don't have anything to add. I do remember it working smoothly when used with PhpStorm.

@newrey
Copy link

newrey commented Aug 20, 2016

same question,is anybody success?
what's your config in PhpStorm and php.ini

@kasperisager
Copy link
Owner

I don't have them anymore I'm afraid.

@khs1994
Copy link

khs1994 commented Sep 11, 2017

Don't use 9000 port.

xdebug.ini example config:

zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
xdebug.remote_enable=on
xdebug.remote_port=9001
xdebug.remote_host=192.168.199.100
xdebug.remote_connect_back=0
xdebug.remote_handler=dbgp
xdebug.remote_log=/var/log/php-fpm/xdebug-remote.log

xdebug.remote_host don't set 127.0.0.1

http://jamescowie.me/blog/2016/12/all-hail-xdebug-and-lets-let-var-dump-die/

@kasperisager
Copy link
Owner

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants