title: PhpStorm Debugger extension is not detected while using with PHPUnit
body: <p>I am using PHPUnit through PhpStorm with a remote interpreter from docker.
  The Container is run through <code>docker-compose</code></p>
  <p>PHPUnit works. Xdebug works through the browser. In <code>docker-php-ext-xdebug.ini</code>, I have all the mandatory options, and I can see in the <code>CLI Interpreter Config</code> that PhpStorm does load this config.</p>
  <p>BUT when I try to run PHPUnit with the debugger I get:</p>
  <blockquote>
  <p>PhpStorm Debugger extension is not detected</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/A7YuV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/A7YuV.png" alt="PhpStorm Debugger extension is not detected" /></a></p>
  <p><strong>CLI Interpreter Config:</strong></p>
  <p><a href="https://i.stack.imgur.com/uj2SX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/uj2SX.png" alt="CLI Interpreter Config" /></a></p>
  <p><strong>DockerFile</strong></p>
  <pre><code>FROM php:7.4-fpm-alpine
  
  # OS DEPENDENCIES
  RUN apk update
  RUN apk add --no-cache bash git curl libmcrypt libmcrypt-dev openssh-client icu-dev
  RUN apk add --no-cache libxml2-dev freetype-dev libpng-dev libjpeg-turbo-dev zip libzip-dev g++ make autoconf
  RUN apk add --no-cache postgresql-dev
  RUN docker-php-source extract
  RUN pecl install xdebug redis
  RUN docker-php-ext-enable xdebug redis
  RUN docker-php-source delete
  RUN docker-php-ext-install -j$(nproc) pgsql
  RUN docker-php-ext-install -j$(nproc) pdo_pgsql
  RUN docker-php-ext-install soap intl zip
  RUN docker-php-ext-install opcache
  
  # XDEBUG CONFIGURATION
  ARG XDEBUG_REMOTE_HOST
  ARG XDEBUG_REMOTE_PORT
  ARG XDEBUG_REMOTE_CONNECT_BACK
  ARG XDEBUG_INI=/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
  
  RUN echo &quot;error_reporting = E_ALL&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;display_startup_errors=1&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;display_errors=1&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.profiler_enable=1&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.remote_enable=1&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.remote_connect_back=$XDEBUG_REMOTE_CONNECT_BACK&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.idekey=\&quot;PHPSTORM\&quot;&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.remote_handler=dbgp&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.remote_port=$XDEBUG_REMOTE_PORT&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.remote_host=$XDEBUG_REMOTE_HOST&quot; &gt;&gt; ${XDEBUG_INI}
  RUN echo &quot;xdebug.remote_autostart=1&quot; &gt;&gt; ${XDEBUG_INI}
  
  # COMPOSER INSTALLATION
  COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
  
  # EXORT COMPOSER GLOBAL PATH
  ENV PATH=&quot;$PATH:$HOME/.composer/vendor/bin&quot; #edited
  </code></pre>
  <p><strong>docker-compose.yaml</strong></p>
  <pre><code>  dataapi:
      container_name: dataapi
      build:
        context: ${DOCKER_FILES_PATH}/privateapi/
        args:
          - XDEBUG_REMOTE_PORT=10000
          - XDEBUG_REMOTE_HOST=172.17.0.1 #DOCKER network IP
          - XDEBUG_REMOTE_CONNECT_BACK=0  #edited
      command: sh -c &quot;composer install &amp;&amp; bin/console doctrine:migrations:migrate --allow-no-migration -n &amp;&amp; php-fpm&quot;
  </code></pre>
  <p><strong>UPDATE:</strong></p>
  <p>Here is the result of phpinto() in phpunit:</p>
  <pre><code>sodium
  
  sodium support =&gt; enabled
  libsodium headers version =&gt; 1.0.18
  libsodium library version =&gt; 1.0.18
  
  SPL
  
  SPL support =&gt; enabled
  Interfaces =&gt; OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
  Classes =&gt; AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
  
  sqlite3
  
  SQLite3 support =&gt; enabled
  SQLite Library =&gt; 3.32.1
  
  Directive =&gt; Local Value =&gt; Master Value
  sqlite3.defensive =&gt; 1 =&gt; 1
  sqlite3.extension_dir =&gt; no value =&gt; no value
  
  standard
  
  Dynamic Library Support =&gt; enabled
  Path to sendmail =&gt; /usr/sbin/sendmail -t -i
  
  Directive =&gt; Local Value =&gt; Master Value
  assert.active =&gt; 1 =&gt; 1
  assert.bail =&gt; 0 =&gt; 0
  assert.callback =&gt; no value =&gt; no value
  assert.exception =&gt; 0 =&gt; 0
  assert.quiet_eval =&gt; 0 =&gt; 0
  assert.warning =&gt; 1 =&gt; 1
  auto_detect_line_endings =&gt; 0 =&gt; 0
  default_socket_timeout =&gt; 60 =&gt; 60
  from =&gt; no value =&gt; no value
  session.trans_sid_hosts =&gt; no value =&gt; no value
  session.trans_sid_tags =&gt; a=href,area=href,frame=src,form= =&gt; a=href,area=href,frame=src,form=
  unserialize_max_depth =&gt; 4096 =&gt; 4096
  url_rewriter.hosts =&gt; no value =&gt; no value
  url_rewriter.tags =&gt; form= =&gt; form=
  user_agent =&gt; no value =&gt; no value
  
  tokenizer
  
  Tokenizer Support =&gt; enabled
  
  xdebug
  
  xdebug support =&gt; enabled
  Version =&gt; 2.9.6
  Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support
  
  Debugger =&gt; enabled
  IDE Key =&gt; PHPSTORM
  
  Directive =&gt; Local Value =&gt; Master Value
  xdebug.auto_trace =&gt; Off =&gt; Off
  xdebug.cli_color =&gt; 0 =&gt; 0
  xdebug.collect_assignments =&gt; Off =&gt; Off
  xdebug.collect_includes =&gt; On =&gt; On
  xdebug.collect_params =&gt; 0 =&gt; 0
  xdebug.collect_return =&gt; Off =&gt; Off
  xdebug.collect_vars =&gt; Off =&gt; Off
  xdebug.coverage_enable =&gt; On =&gt; On
  xdebug.default_enable =&gt; On =&gt; On
  xdebug.dump.COOKIE =&gt; no value =&gt; no value
  xdebug.dump.ENV =&gt; no value =&gt; no value
  xdebug.dump.FILES =&gt; no value =&gt; no value
  xdebug.dump.GET =&gt; no value =&gt; no value
  xdebug.dump.POST =&gt; no value =&gt; no value
  xdebug.dump.REQUEST =&gt; no value =&gt; no value
  xdebug.dump.SERVER =&gt; no value =&gt; no value
  xdebug.dump.SESSION =&gt; no value =&gt; no value
  xdebug.dump_globals =&gt; On =&gt; On
  xdebug.dump_once =&gt; On =&gt; On
  xdebug.dump_undefined =&gt; Off =&gt; Off
  xdebug.file_link_format =&gt; no value =&gt; no value
  xdebug.filename_format =&gt; no value =&gt; no value
  xdebug.force_display_errors =&gt; Off =&gt; Off
  xdebug.force_error_reporting =&gt; 0 =&gt; 0
  xdebug.gc_stats_enable =&gt; Off =&gt; Off
  xdebug.gc_stats_output_dir =&gt; /tmp =&gt; /tmp
  xdebug.gc_stats_output_name =&gt; gcstats.%p =&gt; gcstats.%p
  xdebug.halt_level =&gt; 0 =&gt; 0
  xdebug.idekey =&gt; PHPSTORM =&gt; PHPSTORM
  xdebug.max_nesting_level =&gt; 256 =&gt; 256
  xdebug.max_stack_frames =&gt; -1 =&gt; -1
  xdebug.overload_var_dump =&gt; 2 =&gt; 2
  xdebug.profiler_append =&gt; Off =&gt; Off
  xdebug.profiler_enable =&gt; On =&gt; On
  xdebug.profiler_enable_trigger =&gt; Off =&gt; Off
  xdebug.profiler_enable_trigger_value =&gt; no value =&gt; no value
  xdebug.profiler_output_dir =&gt; /tmp =&gt; /tmp
  xdebug.profiler_output_name =&gt; cachegrind.out.%p =&gt; cachegrind.out.%p
  xdebug.remote_addr_header =&gt; no value =&gt; no value
  xdebug.remote_autostart =&gt; On =&gt; On
  xdebug.remote_connect_back =&gt; Off =&gt; Off
  xdebug.remote_cookie_expire_time =&gt; 3600 =&gt; 3600
  xdebug.remote_enable =&gt; On =&gt; On
  xdebug.remote_host =&gt; 172.17.0.1 =&gt; 172.17.0.1
  xdebug.remote_log =&gt; no value =&gt; no value
  xdebug.remote_log_level =&gt; 7 =&gt; 7
  xdebug.remote_mode =&gt; req =&gt; req
  xdebug.remote_port =&gt; 10000 =&gt; 10000
  xdebug.remote_timeout =&gt; 200 =&gt; 200
  xdebug.scream =&gt; Off =&gt; Off
  xdebug.show_error_trace =&gt; Off =&gt; Off
  xdebug.show_exception_trace =&gt; Off =&gt; Off
  xdebug.show_local_vars =&gt; Off =&gt; Off
  xdebug.show_mem_delta =&gt; Off =&gt; Off
  xdebug.trace_enable_trigger =&gt; Off =&gt; Off
  xdebug.trace_enable_trigger_value =&gt; no value =&gt; no value
  xdebug.trace_format =&gt; 0 =&gt; 0
  xdebug.trace_options =&gt; 0 =&gt; 0
  xdebug.trace_output_dir =&gt; /tmp =&gt; /tmp
  xdebug.trace_output_name =&gt; trace.%c =&gt; trace.%c
  xdebug.var_display_max_children =&gt; 128 =&gt; 128
  xdebug.var_display_max_data =&gt; 512 =&gt; 512
  xdebug.var_display_max_depth =&gt; 3 =&gt; 3
  
  xml
  
  XML Support =&gt; active
  XML Namespace Support =&gt; active
  libxml2 Version =&gt; 2.9.10
  
  xmlreader
  
  XMLReader =&gt; enabled
  
  xmlwriter
  
  XMLWriter =&gt; enabled
  
  Zend OPcache
  
  Opcode Caching =&gt; Disabled
  Optimization =&gt; Disabled
  SHM Cache =&gt; Enabled
  File Cache =&gt; Disabled
  Startup Failed =&gt; Opcode Caching is disabled for CLI
  
  Directive =&gt; Local Value =&gt; Master Value
  opcache.blacklist_filename =&gt; no value =&gt; no value
  opcache.consistency_checks =&gt; 0 =&gt; 0
  opcache.dups_fix =&gt; Off =&gt; Off
  opcache.enable =&gt; On =&gt; On
  opcache.enable_cli =&gt; Off =&gt; Off
  opcache.enable_file_override =&gt; Off =&gt; Off
  opcache.error_log =&gt; no value =&gt; no value
  opcache.file_cache =&gt; no value =&gt; no value
  opcache.file_cache_consistency_checks =&gt; On =&gt; On
  opcache.file_cache_only =&gt; Off =&gt; Off
  opcache.file_update_protection =&gt; 2 =&gt; 2
  opcache.force_restart_timeout =&gt; 180 =&gt; 180
  opcache.huge_code_pages =&gt; Off =&gt; Off
  opcache.interned_strings_buffer =&gt; 8 =&gt; 8
  opcache.lockfile_path =&gt; /tmp =&gt; /tmp
  opcache.log_verbosity_level =&gt; 1 =&gt; 1
  opcache.max_accelerated_files =&gt; 10000 =&gt; 10000
  opcache.max_file_size =&gt; 0 =&gt; 0
  opcache.max_wasted_percentage =&gt; 5 =&gt; 5
  opcache.memory_consumption =&gt; 128 =&gt; 128
  opcache.opt_debug_level =&gt; 0 =&gt; 0
  opcache.optimization_level =&gt; 0 =&gt; 0x7FFEBFFF
  opcache.preferred_memory_model =&gt; no value =&gt; no value
  opcache.preload =&gt; no value =&gt; no value
  opcache.preload_user =&gt; no value =&gt; no value
  opcache.protect_memory =&gt; Off =&gt; Off
  opcache.restrict_api =&gt; no value =&gt; no value
  opcache.revalidate_freq =&gt; 2 =&gt; 2
  opcache.revalidate_path =&gt; Off =&gt; Off
  opcache.save_comments =&gt; On =&gt; On
  opcache.use_cwd =&gt; On =&gt; On
  opcache.validate_permission =&gt; Off =&gt; Off
  opcache.validate_root =&gt; Off =&gt; Off
  opcache.validate_timestamps =&gt; On =&gt; On
  
  zip
  
  Zip =&gt; enabled
  Zip version =&gt; 1.15.6
  Libzip headers version =&gt; 1.6.1
  Libzip library version =&gt; 1.6.1
  
  zlib
  
  ZLib Support =&gt; enabled
  Stream Wrapper =&gt; compress.zlib://
  Stream Filter =&gt; zlib.inflate, zlib.deflate
  Compiled Version =&gt; 1.2.11
  Linked Version =&gt; 1.2.11
  
  Directive =&gt; Local Value =&gt; Master Value
  zlib.output_compression =&gt; Off =&gt; Off
  zlib.output_compression_level =&gt; -1 =&gt; -1
  zlib.output_handler =&gt; no value =&gt; no value
  
  Additional Modules
  
  Module Name
  
  Environment
  
  Variable =&gt; Value
  PATH =&gt; /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/.composer/vendor/bin
  HOSTNAME =&gt; fb6d372627df
  JETBRAINS_REMOTE_RUN =&gt; 1
  IDE_PHPUNIT_PHPUNIT_PHAR =&gt; /var/www/privateapi/vendor/bin/.phpunit/phpunit-7.5-0/phpunit
  IDE_PHPUNIT_VERSION =&gt; 7.5.20
  PHPIZE_DEPS =&gt; autoconf         dpkg-dev dpkg       file        g++         gcc         libc-dev        make        pkgconf         re2c
  PHP_INI_DIR =&gt; /usr/local/etc/php
  PHP_EXTRA_CONFIGURE_ARGS =&gt; --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
  PHP_CFLAGS =&gt; -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  PHP_CPPFLAGS =&gt; -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  PHP_LDFLAGS =&gt; -Wl,-O1 -pie
  GPG_KEYS =&gt; 42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312
  PHP_VERSION =&gt; 7.4.7
  PHP_URL =&gt; https://www.php.net/distributions/php-7.4.7.tar.xz
  PHP_ASC_URL =&gt; https://www.php.net/distributions/php-7.4.7.tar.xz.asc
  PHP_SHA256 =&gt; 53558f8f24cd8ab6fa0ea252ca8198e2650160649681ce5230c1df1dc2b52faf
  PHP_MD5 =&gt;  
  HOME =&gt; /root
  APP_ENV =&gt; test
  KERNEL_CLASS =&gt; App\Kernel
  APP_AUTH_API_HOST =&gt; http://authapi
  DATABASE_URL_TEST =&gt; postgresql://postgres:postgres@172.17.0.1:5433/privateapi_test
  CORS_ALLOW_ORIGIN =&gt; ^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$
  
  PHP Variables
  
  Variable =&gt; Value
  $_ENV['PATH'] =&gt; /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/.composer/vendor/bin
  $_ENV['HOSTNAME'] =&gt; fb6d372627df
  $_ENV['JETBRAINS_REMOTE_RUN'] =&gt; 1
  $_ENV['IDE_PHPUNIT_PHPUNIT_PHAR'] =&gt; /var/www/privateapi/vendor/bin/.phpunit/phpunit-7.5-0/phpunit
  $_ENV['IDE_PHPUNIT_VERSION'] =&gt; 7.5.20
  $_ENV['PHPIZE_DEPS'] =&gt; autoconf        dpkg-dev dpkg       file        g++         gcc         libc-dev        make        pkgconf         re2c
  $_ENV['PHP_INI_DIR'] =&gt; /usr/local/etc/php
  $_ENV['PHP_EXTRA_CONFIGURE_ARGS'] =&gt; --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
  $_ENV['PHP_CFLAGS'] =&gt; -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  $_ENV['PHP_CPPFLAGS'] =&gt; -fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
  $_ENV['PHP_LDFLAGS'] =&gt; -Wl,-O1 -pie
  $_ENV['GPG_KEYS'] =&gt; 42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312
  $_ENV['PHP_VERSION'] =&gt; 7.4.7
  $_ENV['PHP_URL'] =&gt; https://www.php.net/distributions/php-7.4.7.tar.xz
  $_ENV['PHP_ASC_URL'] =&gt; https://www.php.net/distributions/php-7.4.7.tar.xz.asc
  $_ENV['PHP_SHA256'] =&gt; 53558f8f24cd8ab6fa0ea252ca8198e2650160649681ce5230c1df1dc2b52faf
  $_ENV['PHP_MD5'] =&gt; 
  $_ENV['HOME'] =&gt; /root
  $_ENV['APP_ENV'] =&gt; test
  $_ENV['KERNEL_CLASS'] =&gt; App\Kernel
  $_ENV['APP_AUTH_API_HOST'] =&gt; http://authapi
  $_ENV['DATABASE_URL_TEST'] =&gt; postgresql://postgres:postgres@172.17.0.1:5433/privateapi_test
  $_ENV['CORS_ALLOW_ORIGIN'] =&gt; ^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$
  $_ENV['APP_SECRET'] =&gt; $ecretf0rt3st
  $_ENV['DATABASE_URL'] =&gt; 
  $_ENV['SYMFONY_DOTENV_VARS'] =&gt; APP_SECRET,DATABASE_URL,SYMFONY_DEPRECATIONS_HELPER,PANTHER_APP_ENV
  $_ENV['SYMFONY_DEPRECATIONS_HELPER'] =&gt; 999999
  $_ENV['PANTHER_APP_ENV'] =&gt; panther
  $_ENV['APP_DEBUG'] =&gt; 1
  </code></pre>
  <p>Set Up:</p>
  <ul>
  <li>Ubuntu 20.04</li>
  <li>PhpStorm 2020.1.4</li>
  <li>Docker 19.03.12</li>
  <li>docker-compose 1.26.0</li>
  </ul>