Commit c742565f authored by Davide Aprea's avatar Davide Aprea
Browse files

add installation xdebug

parent cb2a1b16
......@@ -6,7 +6,6 @@ Homestead.json
Homestead.yaml
.env
.orig
.vscode
langfiles.zip
npm-debug.log
# The Files created by Webpack in the build process
......
{
// 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": "PHP - Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "PHP - Launch currently open script",
"type": "php",
"request": "launch",
"port": 9000,
"program": "${file}",
"cwd": "${fileDirname}",
"pathMappings": {
"/public": "${workspaceRoot}/public",
"/app": "${workspaceRoot}/app"
}
}
]
}
\ No newline at end of file
......@@ -24,6 +24,7 @@ RUN apk add --update \
php7-json \
php7-pcntl \
php7-fileinfo \
php7-xdebug \
&& rm -rf /var/cache/apk/*
WORKDIR /html
......@@ -45,6 +46,10 @@ RUN sed -i 's/;error_log = log\/php7\/error.log/error_log = \/dev\/stderr/g' /et
sed -i 's/group = www-data/group = nginx/g' /etc/php7/php-fpm.d/www.conf && \
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php7/php.ini && \
sed -i 's/expose_php = On/expose_php = Off/g' /etc/php7/php.ini && \
echo "zend_extension=/usr/lib/php7/modules/xdebug.so" >> /etc/php7/php.ini && \
echo "[XDebug]" >> /etc/php7/php.ini && \
echo "xdebug.remote_enable = 1" >> /etc/php7/php.ini && \
echo "xdebug.remote_autostart = 1" >> /etc/php7/php.ini && \
echo "daemonize yes" >> /etc/redis.conf && \
ln -s /dev/null /var/log/nginx/access.log && \
ln -s /dev/stdout /var/log/nginx/error.log && \
......
<?php
$arr = array(0,1,2,3);
$sum = 0;
//obviously running into array index out of bounds
for($i = 0; $i < 10; $i++){
$sum += $arr[$i];
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment