docksal / docksal

Unified, Docker 🐳 powered web development environments for macOS, Windows, and Linux
https://docksal.io
MIT License
688 stars 179 forks source link

Xdebug not triggering on docksal/cli:2.13-php7.4 #1562

Closed jajajaime closed 2 years ago

jajajaime commented 3 years ago

When attempting to use Xdebug with the docksal/cli:2.13-php7.4 image, nothing happens and breakpoints do not trigger on PhpStorm (at least on a Magento 2.4.2 installation.)

Switching to docksal/cli:2.11-php7.4 makes Xdebug breakpoint trigger without any issues.

Steps to reproduce the issue:

  1. Have a PHP project with docksal/cli:2.11-php7.4
  2. Set breakpoints
  3. Configure Xdebug on PhpStorm
  4. Attempt to trigger the breakpoints

Describe the results you received:

Xdebug did not trigger anywhere and pages load normally.

Describe the results you expected:

Xdebug to trigger on breakpoints.

Output of fin config:

fin config output ``` --------------------- COMPOSE_PROJECT_NAME_SAFE: myproject COMPOSE_FILE: /Users/jaime/.docksal/stacks/volumes-none.yml /Users/jaime/.docksal/stacks/stack-default.yml /Users/jaime/projects/myproject/.docksal/docksal.yml /Users/jaime/projects/myproject/.docksal/docksal-local.yml ENV_FILE: /Users/jaime/projects/myproject/.docksal/docksal.env /Users/jaime/projects/myproject/.docksal/docksal-local.env PROJECT_ROOT: /Users/jaime/projects/myproject DOCROOT: www VIRTUAL_HOST: myproject.docksal VIRTUAL_HOST_ALIASES: *.myproject.docksal IP: 192.168.64.100 MYSQL: 192.168.64.100:33113 Docker Compose configuration --------------------- services: cli: dns: - 192.168.64.100 - 8.8.8.8 environment: BLACKFIRE_CLIENT_ID: null BLACKFIRE_CLIENT_TOKEN: null COMPOSER_ALLOW_XDEBUG: '1' COMPOSER_DEFAULT_VERSION: '2' COMPOSER_DISABLE_XDEBUG_WARN: '1' DOCROOT: www DRUSH_ALLOW_XDEBUG: '1' DRUSH_OPTIONS_URI: myproject.docksal GIT_USER_EMAIL: jaimelopezav@gmail.com GIT_USER_NAME: Jaime HOST_GID: '20' HOST_UID: '501' MYSQL_DATABASE: default MYSQL_HOST: db MYSQL_PASSWORD: user MYSQL_ROOT_PASSWORD: root MYSQL_USER: user PHP_IDE_CONFIG: serverName=myproject.docksal SECRET_ACAPI_EMAIL: null SECRET_ACAPI_KEY: null SECRET_ACQUIACLI_KEY: null SECRET_ACQUIACLI_SECRET: null SECRET_PLATFORMSH_CLI_TOKEN: null SECRET_SSH_PRIVATE_KEY: null SECRET_TERMINUS_TOKEN: null SSH_AUTH_SOCK: /.ssh-agent/proxy-socket VIRTUAL_HOST: myproject.docksal XDEBUG_CONFIG: client_host=192.168.64.1 remote_host=192.168.64.1 XDEBUG_ENABLED: '1' healthcheck: interval: 10s hostname: cli image: docksal/cli:2.13-php7.4 labels: io.docksal.shell: bash io.docksal.user: docker logging: options: max-file: '10' max-size: 1m volumes: - docksal_ssh_agent:/.ssh-agent:ro - cli_home:/home/docker:rw - /tmp/.docksal/myproject:/tmp/.docksal/myproject:ro - project_root:/var/www:rw,nocopy,cached db: dns: - 192.168.64.100 - 8.8.8.8 environment: MYSQL_ALLOW_EMPTY_PASSWORD: null MYSQL_DATABASE: default MYSQL_INITDB_SKIP_TZINFO: null MYSQL_ONETIME_PASSWORD: null MYSQL_PASSWORD: user MYSQL_RANDOM_ROOT_PASSWORD: null MYSQL_ROOT_PASSWORD: root MYSQL_USER: user healthcheck: interval: 10s hostname: db image: docksal/mariadb:10.4 logging: options: max-file: '10' max-size: 1m ports: - published: 33113 target: 3306 volumes: - db_data:/var/lib/mysql:rw - project_root:/var/www:ro,nocopy,cached elasticsearch: dns: - 192.168.64.100 - 8.8.8.8 - 192.168.64.100 - 8.8.8.8 entrypoint: /usr/share/elasticsearch/docksal/entrypoints/elasticsearch.sh environment: ES_JAVA_OPTS: -Xms512m -Xmx512m bootstrap.memory_lock: "true" discovery.type: single-node hostname: elasticsearch image: elasticsearch:7.9.3 ports: - target: 9200 ulimits: memlock: hard: -1 soft: -1 volumes: - /Users/jaime/projects/myproject/.docksal:/usr/share/elasticsearch/docksal:rw mail: dns: - 192.168.64.100 - 8.8.8.8 healthcheck: interval: 10s hostname: mail image: mailhog/mailhog labels: io.docksal.cert-name: none io.docksal.virtual-host: mail.myproject.docksal,mail.myproject.docksal.* io.docksal.virtual-port: '8025' logging: options: max-file: '10' max-size: 1m volumes: - project_root:/var/www:ro,nocopy,cached web: depends_on: cli: condition: service_started dns: - 192.168.64.100 - 8.8.8.8 environment: APACHE_BASIC_AUTH_PASS: null APACHE_BASIC_AUTH_USER: null APACHE_DOCUMENTROOT: /var/www/www APACHE_FCGI_HOST_PORT: cli:9000 healthcheck: interval: 10s hostname: web image: docksal/apache:2.4-2.3 labels: io.docksal.cert-name: none io.docksal.permanent: "false" io.docksal.project-root: /Users/jaime/projects/myproject io.docksal.virtual-host: myproject.docksal,*.myproject.docksal,myproject.docksal.* logging: options: max-file: '10' max-size: 1m volumes: - project_root:/var/www:ro,nocopy,cached version: '2.1' volumes: cli_home: {} db_data: {} docksal_ssh_agent: external: true name: docksal_ssh_agent project_root: {} --------------------- ```


Output of fin sysinfo:

fin sysinfo output ``` β–ˆβ–ˆβ–ˆ FIN fin version: 1.106.0 β–ˆβ–ˆβ–ˆ OS Darwin macOS 11.4 Darwin Macbearth.localdomain 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64 β–ˆβ–ˆβ–ˆ ENVIRONMENT MODE : Docker Desktop DOCKER_HOST : β–ˆβ–ˆβ–ˆ NFS DOCKSAL_NFS_PATH : /Volumes/dev/ nfsd service is enabled nfsd is running (pid 236, 8 threads) NFS EXPORTS ---------- # ---------- Exports list on localhost: /Volumes/dev 127.0.0.1 192.168.64.1 β–ˆβ–ˆβ–ˆ DOCKER EXPECTED CLIENT VERSION: 20.10.7 EXPECTED SERVER VERSION: 20.10.7 Client: Version: 20.10.7 API version: 1.41 Go version: go1.16.4 Git commit: f0df350 Built: Wed Jun 2 11:56:22 2021 OS/Arch: darwin/amd64 Context: default Experimental: true Server: Docker Engine - Community Engine: Version: 20.10.8 API version: 1.41 (minimum version 1.12) Go version: go1.16.6 Git commit: 75249d8 Built: Fri Jul 30 19:52:10 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.9 GitCommit: e25210fe30a0a703442421b0f60afac609f950a3 runc: Version: 1.0.1 GitCommit: v1.0.1-0-g4144b63 docker-init: Version: 0.19.0 GitCommit: de40ad0 β–ˆβ–ˆβ–ˆ DOCKER COMPOSE EXPECTED VERSION: 1.29.2 docker-compose version 1.29.2, build 5becea4c docker-py version: 5.0.0 CPython version: 3.9.0 OpenSSL version: OpenSSL 1.1.1h 22 Sep 2020 β–ˆβ–ˆβ–ˆ DOCKSAL: PROJECTS project STATUS virtual host project root myproject Up 21 hours (healthy) myproject.docksal,*.myproject.docksal,myproject.docksal.* /Users/jaime/projects/myproject β–ˆβ–ˆβ–ˆ DOCKSAL: VIRTUAL HOSTS *.myproject.docksal mail.myproject.docksal.* mail.myproject.docksal myproject.docksal.* myproject.docksal β–ˆβ–ˆβ–ˆ DOCKSAL: NETWORKING DOCKSAL_IP: 192.168.64.100 DOCKSAL_HOST_IP: 192.168.64.1 DOCKSAL_VHOST_PROXY_IP: 0.0.0.0 DOCKSAL_DNS_IP: 0.0.0.0 DOCKSAL_DNS_DISABLED: 0 DOCKSAL_NO_DNS_RESOLVER: 0 DOCKSAL_DNS_UPSTREAM: DOCKSAL_DNS_DOMAIN: docksal β–ˆβ–ˆβ–ˆ DOCKSAL: CONNECTIVITY Host to 192.168.64.100: PASS Container to 192.168.64.100: FAIL Container to 192.168.64.1: FAIL Checking connectivity to http://dns-test.docksal... Host: PASS Containers: PASS β–ˆβ–ˆβ–ˆ DOCKER: RUNNING CONTAINERS CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 762d3ea7126d docksal/cli:2.13-php7.4 "/opt/startup.sh sup…" About a minute ago Up About a minute (healthy) 22/tcp, 3000/tcp, 9000/tcp myproject_cli_1 64a01972464a docksal/apache:2.4-2.3 "httpd-foreground" 3 days ago Up 21 hours (healthy) 80/tcp, 443/tcp myproject_web_1 f52a2e57039a mailhog/mailhog "MailHog" 2 weeks ago Up 21 hours 1025/tcp, 8025/tcp myproject_mail_1 aecfb0a45dce elasticsearch:7.9.3 "/usr/share/elastics…" 2 weeks ago Up 21 hours 9300/tcp, 0.0.0.0:60446->9200/tcp myproject_elasticsearch_1 e0740a700c96 docksal/mariadb:10.4 "docker-entrypoint.s…" 2 weeks ago Up 21 hours (healthy) 0.0.0.0:33113->3306/tcp, :::33113->3306/tcp myproject_db_1 49833c7cb31b docksal/ssh-agent:1.3 "docker-entrypoint.s…" 2 weeks ago Up 3 days (healthy) docksal-ssh-agent abf84aee8a8f docksal/dns:1.1 "docker-entrypoint.s…" 2 weeks ago Up 3 days (healthy) 0.0.0.0:53->53/udp docksal-dns 6fe7d637d961 docksal/vhost-proxy:1.7 "docker-entrypoint.s…" 2 weeks ago Up 3 days (healthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp docksal-vhost-proxy β–ˆβ–ˆβ–ˆ DOCKER: NETWORKS NETWORK ID NAME DRIVER SCOPE 596ba49a2edc _default bridge local c86c6be15a3e bridge bridge local 78678b4ed24a host host local 66748503b133 myproject_default bridge local 48e12c474945 none null local c83eefef59b8 sub_default bridge local β–ˆβ–ˆβ–ˆ DOCKER DESKTOP EXPECTED VERSION: 3.4.0 DETECTED VERSION: 3.6.0 β–ˆβ–ˆβ–ˆ HDD Usage Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1s6s1 466Gi 14Gi 69Gi 18% 553757 4881899123 0% / devfs 193Ki 193Ki 0Bi 100% 666 0 100% /dev /dev/disk1s4 466Gi 18Gi 69Gi 21% 18 4882452862 0% /System/Volumes/VM /dev/disk1s2 466Gi 347Mi 69Gi 1% 1554 4882451326 0% /System/Volumes/Preboot /dev/disk1s7 466Gi 884Ki 69Gi 1% 17 4882452863 0% /System/Volumes/Update /dev/disk1s1 466Gi 238Gi 69Gi 78% 1789973 4880662907 0% /System/Volumes/Data map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /System/Volumes/Data/home /dev/disk1s5 466Gi 125Gi 69Gi 65% 7166888 4875285992 0% /Volumes/dev ```
lpeabody commented 3 years ago

@jajajaime sorry you're having this issue. In addition to the debug info you've already provided, with XDEBUG_ENABLED="1" (looks like it already is above) active in the container, can you you also provide the output for:

In addition, can you provide the:

jajajaime commented 3 years ago

@lpeabody sure thing! Thanks for getting back on this issue.

fin exec php -i | egrep "[Xx]debug" ``` /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini, with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans extension 'xdebug' detected xdebug Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support xdebug.auto_trace => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.auto_trace" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.auto_trace" xdebug.cli_color => 0 => 0 xdebug.client_discovery_header => no value => no value xdebug.client_host => 192.168.64.1 => localhost xdebug.client_port => 9003 => 9003 xdebug.cloud_id => no value => no value xdebug.collect_assignments => Off => Off xdebug.collect_includes => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.collect_includes" => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.collect_includes" xdebug.collect_params => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.collect_params" => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.collect_params" xdebug.collect_return => Off => Off xdebug.collect_vars => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.collect_vars" => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.collect_vars" xdebug.connect_timeout_ms => 200 => 200 xdebug.coverage_enable => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.coverage_enable" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.coverage_enable" xdebug.default_enable => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.default_enable" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.default_enable" xdebug.discover_client_host => Off => Off xdebug.dump.COOKIE => no value => no value xdebug.dump.ENV => no value => no value xdebug.dump.FILES => no value => no value xdebug.dump.GET => no value => no value xdebug.dump.POST => no value => no value xdebug.dump.REQUEST => no value => no value xdebug.dump.SERVER => no value => no value xdebug.dump.SESSION => no value => no value xdebug.dump_globals => On => On xdebug.dump_once => On => On xdebug.dump_undefined => Off => Off xdebug.file_link_format => no value => no value xdebug.filename_format => no value => no value xdebug.force_display_errors => Off => Off xdebug.force_error_reporting => 0 => 0 xdebug.gc_stats_enable => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.gc_stats_enable" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.gc_stats_enable" xdebug.gc_stats_output_dir => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.gc_stats_output_dir" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.gc_stats_output_dir" xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p xdebug.halt_level => 0 => 0 xdebug.idekey => xdebug_session => xdebug_session xdebug.log => no value => no value xdebug.log_level => 7 => 7 xdebug.max_nesting_level => 256 => 256 xdebug.max_stack_frames => -1 => -1 xdebug.mode => develop => develop xdebug.output_dir => /tmp => /tmp xdebug.overload_var_dump => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.overload_var_dump" => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.overload_var_dump" xdebug.profiler_append => Off => Off xdebug.profiler_enable => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_enable" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_enable" xdebug.profiler_enable_trigger => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_enable_trigger" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_enable_trigger" xdebug.profiler_enable_trigger_value => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_enable_trigger_value" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_enable_trigger_value" xdebug.profiler_output_dir => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_output_dir" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.profiler_output_dir" xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p xdebug.remote_autostart => 1 => 1 xdebug.remote_connect_back => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_connect_back" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_connect_back" xdebug.remote_enable => 1 => 1 xdebug.remote_host => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_host" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_host" xdebug.remote_log => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_log" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_log" xdebug.remote_log_level => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_log_level" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_log_level" xdebug.remote_mode => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_mode" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_mode" xdebug.remote_port => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_port" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_port" xdebug.remote_timeout => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_timeout" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.remote_timeout" xdebug.scream => Off => Off xdebug.show_error_trace => Off => Off xdebug.show_exception_trace => Off => Off xdebug.show_local_vars => Off => Off xdebug.show_mem_delta => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.show_mem_delta" => This setting has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#removed-"xdebug.show_mem_delta" xdebug.start_upon_error => default => default xdebug.start_with_request => default => default xdebug.trace_enable_trigger => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.trace_enable_trigger" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.trace_enable_trigger" xdebug.trace_enable_trigger_value => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.trace_enable_trigger_value" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.trace_enable_trigger_value" xdebug.trace_format => 0 => 0 xdebug.trace_options => 0 => 0 xdebug.trace_output_dir => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.trace_output_dir" => This setting has been changed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-"xdebug.trace_output_dir" xdebug.trace_output_name => trace.%c => trace.%c xdebug.trigger_value => no value => no value xdebug.var_display_max_children => 128 => 128 xdebug.var_display_max_data => 512 => 512 xdebug.var_display_max_depth => 3 => 3 ```
fin exec env ``` HOST_UID=501 PYENV_VERSION_INSTALL=1.2.21 PYENV_SHELL=bash NVM_INC=/home/docker/.nvm/versions/node/v14.15.1/include/node rvm_prefix=/home/docker WEB_KEEPALIVE=0 ACQUIA_CLI_VERSION=1.3.0 VSCODE_GITLENS_VERSION=11.0.6 HOSTNAME=cli PHP_VERSION=7.4.13 COMPOSER_ALLOW_XDEBUG=1 XDEBUG_ENABLED=1 VSCODE_XDEBUG_VERSION=1.13.0 RUBY_VERSION_INSTALL=2.7.2 PHP_INI_DIR=/usr/local/etc/php VSCODE_EXT_DIRECTORY=/home/docker/code-server/extensions SSH_AUTH_SOCK=/.ssh-agent/proxy-socket GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312 BLACKFIRE_VERSION=1.44.1 DRUSH_ALLOW_XDEBUG=1 DRUSH_LAUNCHER_VERSION=0.8.0 MY_RUBY_HOME=/home/docker/.rvm/rubies/ruby-2.7.2 MG_CODEGEN_VERSION=1.11.2 PHP_LDFLAGS=-Wl,-O1 -pie YARN_VERSION=1.22.10 RUBY_VERSION=ruby-2.7.2 NVM_VERSION=0.37.2 PWD=/var/www/www DRUSH_LAUNCHER_FALLBACK=/usr/local/bin/drush8 rvm_version=1.29.10 (1.29.10) WPCLI_VERSION=2.4.0 MYSQL_ROOT_PASSWORD=root TERMINUS_VERSION=2.4.1 XDEBUG_CONFIG=client_host=192.168.64.1 remote_host=192.168.64.1 NOTVISIBLE=in users profile MYSQL_PASSWORD=user LINES=79 DRUPAL_CONSOLE_LAUNCHER_VERSION=1.9.7 MYSQL_USER=user HOME=/home/docker DRUSH_OPTIONS_URI=myproject.docksal PHP_IDE_CONFIG=serverName=myproject.docksal LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: COLUMNS=120 VSCODE_HOME=/home/docker/code-server GOSU_VERSION=1.12 PHP_SHA256=aead303e3abac23106529560547baebbedba0bb2943b91d5aa08fff1f41680f4 GIT_USER_NAME=Jaime XHPROF_ENABLED=0 MYSQL_HOST=db PHPIZE_DEPS=autoconf dpkg-dev file g++ gcc libc-dev make pkg-config re2c NVM_DIR=/home/docker/.nvm GIT_USER_EMAIL=myemail@email.com rvm_bin_path=/home/docker/.rvm/bin GEM_PATH=/home/docker/.rvm/gems/ruby-2.7.2:/home/docker/.rvm/gems/ruby-2.7.2@global GEM_HOME=/home/docker/.rvm/gems/ruby-2.7.2 RVM_VERSION_INSTALL=1.29.10 VIRTUAL_HOST=myproject.docksal TERM=xterm JQ_VERSION=1.6 PHP_URL=https://www.php.net/distributions/php-7.4.13.tar.xz COMPOSER_DEFAULT_VERSION=2 CODE_SERVER_VERSION=3.7.4 VISIBLE=now PLATFORMSH_CLI_VERSION=3.63.3 GOMPLATE_VERSION=3.8.0 PHP_EXTRA_CONFIGURE_ARGS=--enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi SHLVL=1 NVM_CD_FLAGS= COMPOSER_VERSION=1.10.19 PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 MYSQL_DATABASE=default YQ_VERSION=3.4.1 XHPROF_OUTPUT_DIR=/tmp/xhprof PYENV_ROOT=/home/docker/.pyenv BUNDLE_PATH=.bundle LC_ALL=en_US.utf8 PROJECT_ROOT=/var/www DRUSH_BACKDROP_VERSION=1.2.0 DOCROOT=www HOST_GID=20 PATH=/home/docker/.pyenv/shims:/home/docker/.pyenv/bin:/home/docker/.rvm/gems/ruby-2.7.2/bin:/home/docker/.rvm/gems/ruby-2.7.2@global/bin:/home/docker/.rvm/rubies/ruby-2.7.2/bin:/home/docker/.yarn/bin:/home/docker/.config/yarn/global/node_modules/.bin:/home/docker/.nvm/versions/node/v14.15.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/docker/.composer/vendor/bin:/home/docker/.rvm/bin NVM_BIN=/home/docker/.nvm/versions/node/v14.15.1/bin COMPOSER_DISABLE_XDEBUG_WARN=1 NODE_VERSION=14.15.1 DRUSH_VERSION=8.4.5 IRBRC=/home/docker/.rvm/rubies/ruby-2.7.2/.irbrc COMPOSER2_VERSION=2.0.8 PHP_ASC_URL=https://www.php.net/distributions/php-7.4.13.tar.xz.asc rvm_path=/home/docker/.rvm PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 _=/usr/bin/env ```

PhpStorm settings Added server with:

  1. Name: myproject.docksal
  2. Host: myproject.docksal
  3. Port: 80 (default)
  4. Debugger: Xdebug
  5. Use path mappings: checked
  6. Mapped project root to /var/www on the server
  7. The Debug config shows ports 9000,9003 configured for Xdebug
lpeabody commented 3 years ago

Thank you for including that. I think I see the issue, or at least part of it. Can you add the following to docksal.yml and then run fin up:

services:
  cli:
    environment:
      - "XDEBUG_MODE=debug"

Let me know how that works. For reference https://xdebug.org/docs/all_settings#mode. In the latest released version of service/cli (3.0), we configured xdebug.mode=debug to be set OOTB in that image, but in service/cli versions 2.12+ Xdebug was accidentally upgraded during the builds for those images, and the debug mode was not properly set.

EDIT: If you can I would also recommend updating your cli service to use the latest version, docksal/cli:php7.4-3.0, which would also likely resolve this issue (i.e. you would not need to set XDEBUG_MODE in docksal.yml).

jajajaime commented 3 years ago

Sadly, setting that environment variable (with and without the quotes) still renders xdebug.mode => develop => develop when I view the php -i info, and Xdebug does not trigger on breakpoints.

What's the real difference between using docksal/cli:2.13-php7.4 vs docksal/cli:php7.4-3.0?

lpeabody commented 3 years ago

@jajajaime php -i is just going to output the configuration in the ini file, that won't show overridden values from environment variables, so that is to be expected. The difference in cli versions is Xdebug configuration as brought up to speed in the 3.0 https://github.com/docksal/service-cli/blob/v3.0.0/7.4/config/php/xdebug.ini (includes setting debug mode and client port setting, both were added in Xdebug 3.).

Can you try using service/cli:php7.4-3.0 to see if that gets Xdebug to trigger? I'm just trying to narrow down the problem.

lpeabody commented 3 years ago

Likely related https://github.com/docksal/service-cli/issues/212

jajajaime commented 3 years ago

@lpeabody I tried docksal/cli:php7.4-3.0 but same result. Xdebug does not trigger.

lpeabody commented 3 years ago

@jajajaime On your system, can you create a brand new Docksal PHP project and configure it in PHPStorm so that it stops at a breakpoint?

jajajaime commented 3 years ago

@lpeabody That worked. I used the Laravel boilerplate and set the docksal/cli:php7.4-3.0 image, and it breaks at breakpoints. I wonder what's different in my Magento project.

lpeabody commented 3 years ago

Okay great. In your original project, can you try resetting both the cli and web services and see if that helps? Via fin reset ...

sean-e-dietrich commented 2 years ago

Hey @jajajaime wanted to check in and see if you were still running into issue

jajajaime commented 2 years ago

I'm sorry but I haven't tried since. I am now running a Mac M1 and using docksal/cli:php7.4-3.0 for compatibility. I don't think the older one from this original issue will run smoothly here.

sean-e-dietrich commented 2 years ago

Ok. Thank you for letting us know. Let us know if you run into any other issues and we can open a new ticket.