From 2ffd002e8d229cf67f0bddda55494482248dabcf Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 5 Feb 2022 22:16:41 +0100 Subject: [PATCH 1/3] Updated Xdebug 2.8.1 > latest Updated nodeJS 12.x > 16.x (LTS version) --- .devcontainer/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 { \ From bff98d6d7114c590884d221c6bf4d40076a8e925 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 5 Feb 2022 22:56:29 +0100 Subject: [PATCH 2/3] Added launch.json for xdebug --- .vscode/launch.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .vscode/launch.json 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 From 2e47d370b0fa458f083794c25593c40fd4187367 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 5 Feb 2022 22:57:24 +0100 Subject: [PATCH 3/3] Removed todo task "launch.json" --- README.md | 1 - 1 file changed, 1 deletion(-) 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