docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

Xdebug on bin/magento doesn't work (Docker on Mac)

Open gkopec opened this issue 1 year ago • 1 comments

I tried to use this video instructions: https://courses.m.academy/courses/set-up-magento-2-development-environment-docker/lectures/36677538 to set up Xdebug on CLI commands. But PHPStorm is showing me this:

image

Here is the command it produced:

"[docker-compose://[/Users/genius-dev/Workspace/projects/tip/b2c/compose.yaml, /Users/genius-dev/Workspace/projects/tip/b2c/compose.dev.yaml]:phpfpm/]:php" -dxdebug.mode=debug -dxdebug.client_port=9000 -dxdebug.client_host=docker.for.mac.localhost /var/www/html/bin/magento

I already tried to set up host.docker.internal but it didn't resolve the issue:

image

Xdebug works with HTTP connection without any problems but I can not force it to debug CLI commands.

gkopec avatar Sep 16 '24 08:09 gkopec

Can you try running cli command using this bash file?

https://github.com/Hawksama/docker-magento/blob/master/compose/bin/php-xdebug

Hawksama avatar Sep 20 '24 09:09 Hawksama

Works for me

markshust avatar Dec 01 '24 19:12 markshust