Created
August 24, 2021 12:02
-
-
Save gaambo/9a7c04af2ea0dda35bb5ba687b3a9081 to your computer and use it in GitHub Desktop.
WordPress Core Developing with Xdebug + VSCode + WSL 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# The PHPUnit container. | |
## | |
phpunit: | |
build: | |
context: ./tools/local-env | |
dockerfile: Dockerfile-phpunit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM wordpressdevelop/phpunit:${LOCAL_PHPUNIT:-latest} | |
# install xdebug | |
RUN pecl install -f xdebug \ | |
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for XDebug", | |
"type": "php", | |
"request": "launch", | |
"port": 9000, | |
"hostname": "localhost", | |
"pathMappings": { | |
"/var/www": "${workspaceRoot}" | |
}, | |
"xdebugSettings": { | |
"max_data": -1 | |
} | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdebug.mode=debug | |
xdebug.client_host=host.docker.internal | |
xdebug.client_port=9000 | |
xdebug.discover_client_host=true | |
xdebug.start_with_request=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment