title: Can not set up Xdebug for any IDE using Laradock + PHP 7.2 + PhpStorm/VSCode + Xdebug 2.9.8/Xdebug 3.0.3 working with Laravel project from WSL
body: <p>I have a big issue for setting up Xdebug in my Laravel project + Laradock.
  I have tried with PhpStorm and also with VSCode.</p>
  <p>I also have tried using Xdebug 3, writing the same settings on both xdebug.ini but with the new Xdebug3 sentences.</p>
  <p>Maybe should I have to set up something else inside WSL ?</p>
  <p>I have tried with a lot of combinations on my xdebug.ini but without success.</p>
  <p>Below my configurations file:</p>
  <p><strong>php-fpm/xdebug.ini</strong></p>
  <pre><code>xdebug.remote_host=&quot;host.docker.internal&quot;
  xdebug.remote_connect_back=0
  xdebug.remote_port=9000
  xdebug.idekey=PHPSTORM
  
  xdebug.remote_autostart=1
  xdebug.remote_enable=1
  xdebug.cli_color=1
  xdebug.profiler_enable=0
  xdebug.profiler_output_dir=&quot;~/xdebug/phpstorm/tmp/profiling&quot;
  
  xdebug.remote_handler=dbgp
  xdebug.remote_mode=req
  
  xdebug.var_display_max_children=-1
  xdebug.var_display_max_data=-1
  xdebug.var_display_max_depth=-1
  </code></pre>
  <p><strong>php-workspace/xdebug.ini</strong></p>
  <pre><code>
  xdebug.remote_host=&quot;host.docker.internal&quot;
  xdebug.remote_connect_back=0
  xdebug.remote_port=9000
  xdebug.idekey=PHPSTORM
  
  xdebug.remote_autostart=1
  xdebug.remote_enable=1
  xdebug.cli_color=1
  xdebug.profiler_enable=0
  xdebug.profiler_output_dir=&quot;~/xdebug/phpstorm/tmp/profiling&quot;
  
  xdebug.remote_handler=dbgp
  xdebug.remote_mode=req
  
  xdebug.var_display_max_children=-1
  xdebug.var_display_max_data=-1
  xdebug.var_display_max_depth=-1
  </code></pre>
  <p><strong>LARADOCK FOLDER</strong></p>
  <pre><code>...
  WORKSPACE_INSTALL_XDEBUG=true
  ...
  PHP_FPM_INSTALL_XDEBUG=true
  ...
  # Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time. # visit https://blackfire.io/docs/24-days/06-installation#install-probe-debian for more info.
  INSTALL_BLACKFIRE=false
  </code></pre>
  <p><strong>LARADOCK/PHP-FPM/Dockerfile</strong></p>
  <pre><code>###########################################################################
  # xDebug:
  ###########################################################################
  
  ARG INSTALL_XDEBUG=false
  
  RUN if [ ${INSTALL_XDEBUG} = true ]; then \
    # Install the xdebug extension
    if [ $(php -r &quot;echo PHP_MAJOR_VERSION;&quot;) = &quot;5&quot; ]; then \
      pecl install xdebug-2.5.5; \
    else \
      if [ $(php -r &quot;echo PHP_MINOR_VERSION;&quot;) = &quot;0&quot; ]; then \
        pecl install xdebug-2.9.0; \
      else \
        pecl install xdebug-2.9.8; \
      fi \
    fi &amp;&amp; \
    docker-php-ext-enable xdebug \
  ;fi
  
  # Copy xdebug configuration for remote debugging
  COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
  
  RUN sed -i &quot;s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/&quot; /usr/local/etc/php/conf.d/xdebug.ini &amp;&amp; \
      sed -i &quot;s/xdebug.remote_enable=0/xdebug.remote_enable=1/&quot; /usr/local/etc/php/conf.d/xdebug.ini &amp;&amp; \
      sed -i &quot;s/xdebug.cli_color=0/xdebug.cli_color=1/&quot; /usr/local/etc/php/conf.d/xdebug.ini
  
  </code></pre>
  <p><strong>LARADOCK/WORKSPACE/Dockerfile</strong></p>
  <pre><code>###########################################################################
  # xDebug:
  ###########################################################################
  
  USER root
  
  ARG INSTALL_XDEBUG=false
  
  RUN if [ ${INSTALL_XDEBUG} = true ]; then \
    # Install the xdebug extension
    if [ $(php -r &quot;echo PHP_MAJOR_VERSION;&quot;) = &quot;5&quot; ]; then \
      pecl install xdebug-2.5.5; \
    else \
      if [ $(php -r &quot;echo PHP_MAJOR_VERSION;&quot;) = &quot;7&quot; ] &amp;&amp; [ $(php -r &quot;echo PHP_MINOR_VERSION;&quot;) = &quot;0&quot; ]; then \
        pecl install xdebug-2.9.0; \
      else \
        if [ $(php -r &quot;echo PHP_MAJOR_VERSION;&quot;) = &quot;7&quot; ] &amp;&amp; [ $(php -r &quot;echo PHP_MINOR_VERSION;&quot;) = &quot;1&quot; ]; then \
          pecl install xdebug-2.9.8; \
        else \
          if [ $(php -r &quot;echo PHP_MAJOR_VERSION;&quot;) = &quot;7&quot; ]; then \
            pecl install xdebug-2.9.8; \
          else \
            #pecl install xdebug; \
            echo &quot;xDebug 3 required, not supported.&quot;; \
          fi \
        fi \
      fi \
    fi &amp;&amp; \
    echo &quot;zend_extension=xdebug.so&quot; &gt;&gt; /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini \
  ;fi
  
  # ADD for REMOTE debugging
  COPY ./xdebug.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
  
  RUN sed -i &quot;s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/&quot; /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini &amp;&amp; \
      sed -i &quot;s/xdebug.remote_enable=0/xdebug.remote_enable=1/&quot; /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini &amp;&amp; \
      sed -i &quot;s/xdebug.cli_color=0/xdebug.cli_color=1/&quot; /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini
  
  </code></pre>
  <p><strong>laradock/docker-compose.yml</strong></p>
  <pre><code>
  ### Workspace Utilities ##################################
      workspace:
        build:
          context: ./workspace
          args:
             ...
            - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
            ...
  ### PHP-FPM ##############################################
      php-fpm:
        build:
          context: ./php-fpm
          args:
            ...
            - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
            ...
  
  </code></pre>
  <p><strong>PHPSTORM SETTINGS</strong>
  <a href="https://i.stack.imgur.com/gFBIQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gFBIQ.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/ZHXFp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZHXFp.png" alt="enter image description here" /></a></p>
  <p><strong>WINDOWS SETTINGS</strong></p>
  <p><a href="https://i.stack.imgur.com/BOTH1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BOTH1.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/1m6Be.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1m6Be.png" alt="enter image description here" /></a></p>
  <p><strong>PHPINFO()</strong></p>
  <p><a href="https://i.stack.imgur.com/4skEt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4skEt.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/jBRbl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jBRbl.png" alt="enter image description here" /></a></p>