docker-magento
docker-magento copied to clipboard
Issues to configure xDebug + PHPStorm + WSL2 (after Docker Update)
After docker update its policy and insert paid subscription I'm trying to change the way I run my projects locally. I currently use: Windows WSL -> Ubuntu
So I removed the docker desktop from windows and installed it on ubuntu. I currently have the containers and files on Ubuntu and PHPStorm on Windows.
My problem is in the xDebug configuration, when trying to add a CLI interpreter no option I was successful. I stopped at the part of connecting to the docker daemon:
My Steps:
1- PhpStorm > Preferences > PHP > CLI Interpreter 2 - Create a new interpreter from the From Docker, Vagrant, VM... list. 3 - I selected Docker but no servers are avaliable, then i click in New:
4- After that I got stuck because I don't know which option to select:
Anyone having the same problem or know how to help? Thanks in advance
I'm not sure if this is any help as I'm a Mac user, but I always select Docker Compose, select the two docker-compose.yml
and docker-compose.dev.yml
files for the config files, and then it automatically finds the Docker images and populates the select dropdowns, which I can then select the phpfpm container.
For me I eventually discovered that the Xdebug client was trying to listen on IPv6 and the Xdebug server was trying to connect on IPv4.
I didn't use PHPStorm but for VSCode specifying the IPv4 localhost address (127.0.0.1) as the hostname worked to force it to listen on IPv4.