[xdebug-general] CLI Remote Debug and remote_connect_back

From: Pelligra S. <pelligra.s[@]gmail.com>
Date: Thu, 15 Sep 2016 23:25:42 +0200

Hello!

I'm using docker to setup my dev environment. Today I tried to remote
debugging a script from CLI and had some headache to make it work. I
configured xdebug like this:

xdebug.remote_enable=1;
xdebug.remote_port=9000;
xdebug.remote_connect_back=1;
xdebug.idekey="docker-test";

And then I run the usual `export XDEBUG_CONFIG="idekey=docker-test"`
inside the docker container. However, even if `php -i` return the
correct settings for xdebug, when I tried to start a debugging session,
it didn't work :/

After a while I figured out the problem was the `remote_host` config and
when I set `export XDEBUG_CONFIG="idekey=docker-test
remote_host=172.17.0.1"` it finally worked!

So, here is my question: why xdebug ignore the remote_connect_back
config when we try to debug a cli script? I can see it causing some kind
of problem in a production environment, but I think xdebug should not be
enabled except for some kind of temporary diagnosis, so the problem
doesn't arise.
Anyway, the `remote_connect_back` description should mention the fact
that it doesn't work with CLI and that `remote_host` is mandatory in
that case.

Thank you,
Best regards
Received on Thu Sep 15 2016 - 22:25:45 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST