diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 230a010..4cf5162 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -13,7 +13,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* # install Node.js -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - ; \ +RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - ; \ apt-get install -y nodejs; \ rm -rf /var/lib/apt/lists/*; @@ -37,12 +37,12 @@ RUN set -ex; \ zip \ ; \ pecl install imagick-3.4.4; \ - pecl install xdebug-2.8.1; \ + pecl install xdebug; \ docker-php-ext-enable imagick xdebug;\ rm -rf /var/lib/apt/lists/* #XDebug settings -RUN echo "[XDebug]\nxdebug.remote_enable = 1\nxdebug.remote_autostart = 1" > $PHP_INI_DIR/conf.d/xdebug.ini +RUN echo "[XDebug]\nxdebug.mode=debug\nxdebug.client_host=host.docker.internal\nxdebug.log=/var/log/php/xdebug.log" > $PHP_INI_DIR/conf.d/xdebug.ini #WP recommended PHP settings RUN { \ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..9aa72bd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for Xdebug (Theme)", + "type": "php", + "request": "launch", + "port": 9003, + "pathMappings": { + "/var/www/html/wp-content/themes/theme-dev": "${workspaceRoot}" + } + }, + { + "name": "Listen for Xdebug (Plugin)", + "type": "php", + "request": "launch", + "port": 9003, + "pathMappings": { + "/var/www/html/wp-content/plugins/plugin-dev": "${workspaceRoot}" + } + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index b4eaf93..a9ba902 100644 --- a/README.md +++ b/README.md @@ -27,5 +27,4 @@ Anything placed in the `plugins` folder (single files or folders) will be copied ## TODO -- provide a preconfigured launch.json for PHP debugging - theme auto-install \ No newline at end of file