wodby / drupal-php

PHP docker container image for Drupal
https://wodby.com/stacks/drupal
MIT License
61 stars 79 forks source link

Disable remote_autostart #4

Closed fortis closed 8 years ago

fortis commented 8 years ago

Do we really need to keep it started always?

xdebug.remote_autostart Type: boolean, Default value: 0 Normally you need to use a specific HTTP GET/POST variable to start remote debugging (see Remote Debugging). When this setting is set to 1, Xdebug will always attempt to start a remote debugging session and try to connect to a client, even if the GET/POST/COOKIE variable was not present.

fortis commented 8 years ago

I usually use chrome extension to enable xdebug session

pprishchepa commented 8 years ago

As for me, remote_autostart=0 is kind of old-fashioned way. If remote_autostart=1, all you need to do to debug just put a breakpoint. It's simpler than with a browser extension, isn't it?

fortis commented 8 years ago

but it causes significant performance degradation and increases time to serve every request.

fortis commented 8 years ago

you can see it on a fresh drupal installation, and there more disadvantages than advantages

pprishchepa commented 8 years ago

As a compromise solution, I suggest you to disable xdebug autostart via the env var XDEBUG_CONFIG: "xdebug.remote_autostart=0" in the php container. You can specify many options divided by space.

fortis commented 8 years ago

seems that XDEBUG_CONFIG variable missing https://github.com/Wodby/drupal-php/blob/master/7.0/docker-entrypoint.sh

pprishchepa commented 8 years ago

Env var XDEBUG_CONFIG already supported by xdebug. You can see some examples here.

pprishchepa commented 8 years ago

@fortis you can use the PHP_XDEBUG_AUTOSTART: 0 env var to disable xdebug autostart.

pprishchepa commented 8 years ago

I'm going to close the PR due to no activity.