Skip to content

Commit 659bb3a

Browse files
committed
add xDebug to vagrant vm
1 parent 947c8e8 commit 659bb3a

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.dev/vagrant/provision.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export DEBIAN_FRONTEND=noninteractive
1919
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password password pterodactyl'
2020
debconf-set-selections <<< 'mariadb-server-5.5 mysql-server/root_password_again password pterodactyl'
2121
# actually install
22-
apt-get install -y php7.1 php7.1-cli php7.1-gd php7.1-mysql php7.1-pdo php7.1-mbstring php7.1-tokenizer php7.1-bcmath php7.1-xml php7.1-fpm php7.1-memcached php7.1-curl php7.1-zip mariadb-server nginx curl tar unzip git memcached > /dev/null
22+
apt-get install -y php7.1 php7.1-cli php7.1-gd php7.1-mysql php7.1-pdo php7.1-mbstring php7.1-tokenizer php7.1-bcmath php7.1-xml php7.1-fpm php7.1-memcached php7.1-curl php7.1-zip php-xdebug mariadb-server nginx curl tar unzip git memcached > /dev/null
2323

2424
echo "Install composer"
2525
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
@@ -31,11 +31,15 @@ cp /var/www/html/pterodactyl/.dev/vagrant/mailhog.service /etc/systemd/system/
3131
systemctl enable mailhog.service
3232
systemctl start mailhog
3333

34+
echo "Configure xDebug"
35+
cp /var/www/html/pterodactyl/.dev/vagrant/xdebug.ini /etc/php/7.1/mods-available/
36+
systemctl restart php7.1-fpm
37+
3438
echo "Configure nginx"
3539
cp /var/www/html/pterodactyl/.dev/vagrant/pterodactyl.conf /etc/nginx/sites-available/
3640
rm /etc/nginx/sites-available/default
3741
ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
38-
service nginx restart
42+
systemctl restart nginx
3943

4044
echo "Setup database"
4145
# Replace default config with custom one to bind mysql to 0.0.0.0 to make it accessible from the host

.dev/vagrant/xdebug.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
zend_extension=xdebug.so
2+
3+
xdebug.remote_enable=1
4+
xdebug.remote_connect_back=1
5+
xdebug.remote_port=9000
6+
xdebug.scream=0
7+
xdebug.show_local_vars=1
8+
xdebug.idekey=PHPSTORM
9+
10+
xdebug.remote_log=/tmp/xdebug.log

0 commit comments

Comments
 (0)