File tree Expand file tree Collapse file tree 5 files changed +32
-7
lines changed Expand file tree Collapse file tree 5 files changed +32
-7
lines changed Original file line number Diff line number Diff line change 8
8
"name" : " Listen for Xdebug (remote/docker)" ,
9
9
"type" : " php" ,
10
10
"request" : " launch" ,
11
+ "hostname" : " 0.0.0.0" ,
11
12
"port" : 9000 ,
12
13
"pathMappings" : {
13
14
"/var/www/html/" : " ${workspaceFolder}/docker/wordpress" ,
14
15
"/var/www/html/wp-content/plugins/woocommerce-gateway-stripe/" : " ${workspaceFolder}"
15
- }
16
+ },
17
+ "preLaunchTask" : " enable:xdebug" ,
18
+ "postDebugTask" : " disable:xdebug"
16
19
},
17
20
{
18
21
"name" : " Listen for Xdebug (local)" ,
Original file line number Diff line number Diff line change
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+ // for the documentation about the tasks.json format
4
+ "version" : " 2.0.0" ,
5
+ "tasks" : [
6
+ {
7
+ "type" : " shell" ,
8
+ "command" : " npm run xdebug:start" ,
9
+ "label" : " enable:xdebug"
10
+ },
11
+ {
12
+ "type" : " shell" ,
13
+ "command" : " npm run xdebug:stop" ,
14
+ "label" : " disable:xdebug"
15
+ }
16
+ ]
17
+ }
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ services:
21
21
- ./tests/phpunit:/var/www/html/wp-content/plugins/woocommerce-gateway-stripe/tests/phpunit
22
22
- ./docker/dev-php.ini:/usr/local/etc/php/conf.d/dev-php.ini
23
23
- ./docker/bin:/var/scripts
24
+ extra_hosts :
25
+ - " host.docker.internal:host-gateway"
24
26
db :
25
27
container_name : woocommerce_stripe_mysql
26
28
image : mariadb:10.5.8
Original file line number Diff line number Diff line change 1
1
FROM wordpress:php7.3
2
- RUN pecl install xdebug-2.9.8 \
3
- && echo 'xdebug.default_enable=1' >> $PHP_INI_DIR/php.ini \
4
- && echo 'xdebug.remote_enable=1' >> $PHP_INI_DIR/php.ini \
5
- && echo 'xdebug.remote_port=9000' >> $PHP_INI_DIR/php.ini \
6
- && echo 'xdebug.remote_host=host.docker.internal' >> $PHP_INI_DIR/php.ini \
7
- && echo 'xdebug.remote_autostart=1' >> $PHP_INI_DIR/php.ini \
2
+ RUN pecl install xdebug \
3
+ && echo 'xdebug.mode=off' >> $PHP_INI_DIR/php.ini \
4
+ && echo 'xdebug.start_with_request=yes' >> $PHP_INI_DIR/php.ini \
5
+ && echo 'xdebug.client_host=host.docker.internal' >> $PHP_INI_DIR/php.ini \
6
+ && echo 'xdebug.discover_client_host=1' >> $PHP_INI_DIR/php.ini \
7
+ && echo 'xdebug.client_port=9000' >> $PHP_INI_DIR/php.ini \
8
+ && echo 'xdebug.log=/tmp/xdebug.log' >> $PHP_INI_DIR/php.ini \
8
9
&& docker-php-ext-enable xdebug
9
10
RUN apt-get update \
10
11
&& apt-get install --assume-yes --quiet --no-install-recommends gnupg2 subversion mariadb-client less jq
Original file line number Diff line number Diff line change 116
116
"uglify" : " for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done" ,
117
117
"up" : " docker-compose up --build --force-recreate -d && ./bin/docker-setup.sh" ,
118
118
"down" : " docker-compose down" ,
119
+ "xdebug:start" : " docker-compose exec wordpress sh -c 'sed -i \" /xdebug.mode=off/c\\ xdebug.mode=debug\" /usr/local/etc/php/php.ini && /etc/init.d/apache2 reload'" ,
120
+ "xdebug:stop" : " docker-compose exec wordpress sh -c 'sed -i \" /xdebug.mode=debug/c\\ xdebug.mode=off\" /usr/local/etc/php/php.ini && /etc/init.d/apache2 reload" ,
119
121
"wp" : " docker run -it --env-file default.env --rm --user xfs --volumes-from woocommerce_stripe_wordpress --network container:woocommerce_stripe_wordpress wordpress:cli" ,
120
122
"listen" : " stripe listen --forward-to 'http://localhost:8082/?wc-api=wc_stripe'" ,
121
123
"presass" : " rm -f $npm_package_assets_styles_css" ,
You can’t perform that action at this time.
0 commit comments