1
0
Fork 0
mirror of synced 2024-07-06 15:11:21 +12:00

Merge pull request #5210 from appwrite/fix-debugger

Fix yasd so that the debugger works
This commit is contained in:
Torsten Dittmann 2023-03-31 18:43:13 +02:00 committed by GitHub
commit e8b6ff2bb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View file

@ -346,8 +346,7 @@ If you are in PHP Storm you don't need any plugin. Below are the settings requir
1. Create an init file.
2. Duplicate **dev/yasd_init.php.stub** file and name it **dev/yasd_init.php**.
3. Change the IP address to your development machine's IP. Without the proper IP address, the debugger won't connect.
4. Set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
3. Set **DEBUG** build arg in **appwrite** service in **docker-compose.yml** file.
### VS Code Launch Configuration

View file

@ -182,7 +182,7 @@ RUN chmod +x /usr/local/bin/doctor && \
RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
# Enable Extensions
RUN if [ "$DEBUG" == "true" ]; then printf "zend_extension=yasd \nyasd.debug_mode=remote \nyasd.init_file=/usr/local/dev/yasd_init.php \nyasd.remote_port=9005 \nyasd.log_level=-1" >> /usr/local/etc/php/conf.d/yasd.ini; fi
RUN if [ "$DEBUG" == "true" ]; then printf "zend_extension=yasd \nyasd.debug_mode=remote \nyasd.init_file=/usr/src/code/dev/yasd_init.php \nyasd.remote_port=9005 \nyasd.log_level=-1" >> /usr/local/etc/php/conf.d/yasd.ini; fi
RUN if [ "$DEBUG" == "true" ]; then echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/appwrite.ini; fi
RUN echo "opcache.preload_user=www-data" >> /usr/local/etc/php/conf.d/appwrite.ini

View file

@ -1,4 +1,4 @@
<?php
echo 'execute init_file success' . PHP_EOL;
Yasd\Api\setRemoteHost('127.0.0.1'); //Set your development machine's IP
Yasd\Api\setRemoteHost('host.docker.internal'); //Set your development machine's IP

View file

@ -83,6 +83,7 @@ services:
- ./docs:/usr/src/code/docs
- ./public:/usr/src/code/public
- ./src:/usr/src/code/src
- ./dev:/usr/src/code/dev
depends_on:
- mariadb
- redis
@ -473,6 +474,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- ./app:/usr/src/code/app
- ./src:/usr/src/code/src
- ./dev:/usr/src/code/dev
- appwrite-functions:/storage/functions:rw
- appwrite-builds:/storage/builds:rw
- /tmp:/tmp:rw