Skip to content

Instantly share code, notes, and snippets.

# Use xdebug with docker-compose on macOS and PhpStorm
1. For your local dev, create a `Dockerfile` that is based on your production image and
simply install `xdebug` into it. Exemple:
```
FROM php:fpm
RUN apt-get update && apt-get install -y libicu-dev libmagickwand-dev libtidy-dev --no-install-recommends \
&& pecl install -o -f imagick redis xdebug \
&& rm -rf /tmp/pear \
@asminog
asminog / MacOS add dnsmasq for local development *.box to localhost
Last active April 6, 2024 13:11
Add wildcard *.dev domain to listen localhost
# Use dnsmasq for local development to resolve *.box to localhost MacOS
```
brew install dnsmasq
echo 'address=/.box/127.0.0.1' >> /usr/local/etc/dnsmasq.conf
echo 'listen-address=127.0.0.1' >> /usr/local/etc/dnsmasq.conf
sudo brew services start dnsmasq
mkdir -p /etc/resolver
sudo echo 'nameserver 127.0.0.1' >> /etc/resolver/box
```