Closed ghost closed 1 year ago
Hi @leoner-omnipro
You can try to configure this in the .env
file:
XDEBUG_REMOTE_HOST=host.docker.internal
Sadly it's quite complicated to setup Xdebug on WSL2 and it's out of the scope of Reward.
See these articles: https://intellij-support.jetbrains.com/hc/en-us/community/posts/4406842719378-Setting-up-debugging-with-XDebug-3-and-WSL2?page=1#comments https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010615740-Xdebug3-WSL2
Hi @leoner-omnipro
You can try to configure this in the
.env
file:XDEBUG_REMOTE_HOST=host.docker.internal
Sadly it's quite complicated to setup Xdebug on WSL2 and it's out of the scope of Reward.
See these articles: https://intellij-support.jetbrains.com/hc/en-us/community/posts/4406842719378-Setting-up-debugging-with-XDebug-3-and-WSL2?page=1#comments https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010615740-Xdebug3-WSL2
I already tried this config in the additional options of CLI configuration, works on different way? Or maybe I'm choosing the wrong container
Hi @janosmiko @leoner-omnipro The same issue on clear Ubuntu 22.04. Temp solution is:
reward debug
echo "xdebug.client_host=host.docker.internal" >> /etc/php/8.1/fpm/conf.d/xdebug.ini
echo "xdebug.client_host=host.docker.internal" >> /etc/php/8.1/cli/conf.d/xdebug.ini
exit
reward env stop php-debug ; reward env up php-debug
I updated the xdebug containers to contain those settings. I also created a new release (v0.4.3) with various bug fixes.
Could you try if it's working now?
$ reward self-update
$ reward env pull
$ reward env up -- php-debug
$ reward debug
www-data@m2-php-debug:/var/www/html$ cat /etc/php/8.1/fpm/conf.d/php-fpm.ini
[php]
memory_limit=-1
[xdebug]
xdebug.mode=debug,trace,profile
xdebug.start_with_request=trigger
xdebug.client_host=host.docker.internal
www-data@m2-php-debug:/var/www/html$ cat /etc/php/8.1/cli/conf.d/php-cli.ini
[php]
memory_limit=-1
[xdebug]
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=host.docker.internal
After adding a custom value to my .env
and I restart the debug container, it's updated as well:
$ echo XDEBUG_REMOTE_HOST=123.232.123.42 >> .env
$ reward env up -- php-debug
$ reward debug
www-data@m2-php-debug:/var/www/html$ cat /etc/php/8.1/fpm/conf.d/php-fpm.ini
[php]
memory_limit=-1
[xdebug]
xdebug.mode=debug,trace,profile
xdebug.start_with_request=trigger
xdebug.client_host=123.232.123.42
Thank you @janosmiko! I'll test it shortly
Hey @janosmiko Thanks, xdebug works as expected on clear Ubuntu 22.04
I can confirm that it is working as expected, tysm! 🚀
Hey! I'm trying to use Xdebug for debug Magento2 modules, the configuration seems to be good but when try to enable debug mode it just isn' working. I connected to container to see logs of ngix and I'm getting this message
Technical Specifications
magento/magento-enterprise-metapackage[2.4.5]
PHPStorm configuration
Server
CLI Interpreter
Here I added some changes to test, but nothing works![image](https://user-images.githubusercontent.com/93623882/221666692-f06b15c6-2cdb-4d72-9ca7-1d88fe5140ab.png)
Debug settings
Remote debug settings
Just let me know pls if I'm missing something in configurations, Thanks!