I am trying to setup xdebug for PhpStorm.
Setup is as follows:
- Symfony application is inside Docker container
- I am using it for the REST API calls
What I have tried till now:
Installed Xdebug - reference
RUN pecl install xdebug RUN docker-php-ext-enable xdebug
And run the commands:
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
echo "xdebug.idekey = PHPSTORM" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
echo "xdebug.default_enable = 0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
echo "xdebug.remote_autostart = 0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
echo "xdebug.remote_connect_back = 0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
echo "xdebug.profiler_enable = 0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
echo "xdebug.remote_host = "docker.for.mac.host.internal"" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
Set up PhpStorm like below image(except the port is 8090 as my web application runs on that port. I access the website locally using localhost:8090/ ):
Now, when I make API call, nothing happens. It wont stop at breakpoint.
Anyone help me with this please?
PS: I am using Xdebug Helper chrome plugin.
