title: Docker PHP with Xdebug 3 env XDEBUG_MODE doesn't work
body: <p>I’m trying to config  <code>Xdebug 3</code> in PHP container, and set  <code>XDEBUG_MODE</code> env variable to <code>off</code>  according  with documentation  <a href="https://xdebug.org/docs/all_settings#mode" rel="noreferrer">https://xdebug.org/docs/all_settings#mode</a> but <code>xdebug_info()</code>  shows that <code>mode=develop</code>. How to fix?</p>
  <p>Dockerfile:</p>
  <pre><code>FROM php:7.4.11-fpm
  …
  ENV XDEBUG_MODE=off
  ENV XDEBUG_CONFIG=&quot;&quot;
  RUN pecl install xdebug \
      &amp;&amp; docker-php-ext-enable xdebug \
  ...
  </code></pre>
  <p>docker-compose.yml:</p>
  <pre><code>services:
    php:
      build:
        dockerfile: ${PWD}/.devcontainer/Dockerfile
      image: php-fpm
      environment:
        XDEBUG_MODE: ${XDEBUG_MODE} // off
        XDEBUG_CONFIG: ${XDEBUG_CONFIG}
  </code></pre>
  <p>xdebug info:</p>
  <pre><code>php -r 'xdebug_info();'
  Version =&gt; 3.0.0
  Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support
  Feature =&gt; Enabled/Disabled
  Development Aids =&gt; ✘ disabled
  Coverage =&gt; ✘ disabled
  GC Stats =&gt; ✘ disabled
  Profiler =&gt; ✘ disabled
  Step Debugger =&gt; ✘ disabled
  Tracing =&gt; ✘ disabled
  
                                     PHP                                   
                             Build Configuration                           
  Version =&gt; 7.4.11
  Debug Build =&gt; no
  Thread Safety =&gt; disabled
                                   Settings                                 
  Configuration File (php.ini) Path =&gt; /usr/local/etc/php
  Loaded Configuration File =&gt; /usr/local/etc/php/php.ini
  Scan this dir for additional .ini files =&gt; /usr/local/etc/php/conf.d
  Additional .ini files parsed =&gt; /usr/local/etc/php/conf.d/docker-php-ext-amqp.ini,
  /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini,
  Directive =&gt; Local Value =&gt; Master Value
  
  xdebug.mode =&gt; develop =&gt; develop
  </code></pre>
  <p><strong>UPDATE:</strong></p>
  <p>My case: I use VSCode to debug my app, so I need to turn on Xdebug module only when Xdebug listening is active. Better way to do that is using env XDEBUG_CONFIG and XDEBUG_MODE, because it not require change ini files.</p>