Created
February 6, 2018 17:13
-
-
Save juandavilau/e69001f5fc8692ac480a7f839f773020 to your computer and use it in GitHub Desktop.
vsconde Laravel homestead PHP Debug config
This file contains 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
;/etc/php/7.1/cli/conf.d/20-xdebug.ini | |
zend_extension=xdebug.so | |
xdebug.remote_enable=1 | |
xdebug.remote_connect_back=1 | |
xdebug.remote_port=9000 | |
xdebug.max_nesting_level=512 | |
xdebug.remote_autostart = 1 |
This file contains 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
#!/bin/sh | |
################################### | |
# homestead after config config # | |
# ~/.homestead # | |
################################### | |
# git clone git://github.com/xdebug/xdebug.git | |
# cd xdebug | |
# phpize | |
# ./configure --enable-xdebug | |
# make | |
# make install | |
# # Configure Xdebug | |
# cat > /etc/php/mods-available/xdebug.ini <<EOL | |
# zend_extension=xdebug.so | |
# xdebug.default_enable=1 | |
# xdebug.remote_enable=1 | |
# xdebug.remote_port=9000 | |
# xdebug.remote_autostart=1 | |
# xdebug.remote_connect_back=1 | |
# EOL | |
# ln -s /etc/php/mods-available/xdebug.ini /etc/php/7.0/fpm/conf.d/20-xdebug.ini | |
# service php7.0-fpm restart | |
#Using Homestead's Xdebug | |
if [ ! -f /etc/php/7.1/mods-available/xdebug.ini ]; then | |
echo "xdebug.ini not found" | |
else | |
sudo truncate -s 0 /etc/php/7.1/mods-available/xdebug.ini | |
sudo sh -c 'echo "zend_extension=xdebug.so" >> /etc/php/7.1/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_enable=1" >> /etc/php/7.1/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_connect_back=1" >> /etc/php/7.1/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_port=9000" >> /etc/php/7.1/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.max_nesting_level=512" >> /etc/php/7.1/mods-available/xdebug.ini' | |
sudo sh -c 'echo "xdebug.remote_autostart = 1" >> /etc/php/7.1/mods-available/xdebug.ini' | |
echo "config done" | |
fi | |
if [ ! -f "/etc/php/7.1/cli/conf.d/20-xdebug.ini" ]; then | |
sudo ln -s /etc/php/7.1/mods-available/xdebug.ini /etc/php/7.1/cli/conf.d/20-xdebug.ini | |
echo "link done" | |
else | |
echo '20-xdebug.ini symlink exists' | |
fi | |
sudo service php7.1-fpm restart | |
php -v |
This file contains 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
///.vscode/launch.json | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for XDebug", | |
"type": "php", | |
"request": "launch", | |
"port": 9000 | |
}, | |
{ | |
"name": "Launch currently open script", | |
"type": "php", | |
"request": "launch", | |
"program": "${file}", | |
"cwd": "${fileDirname}", | |
"port": 9000 | |
}, | |
{ | |
"name": "Listen for XDebug on Homestead", | |
"type": "php", | |
"request": "launch", | |
"port": 9000, | |
"serverSourceRoot": "/home/vagrant/{$VagrantProyectForlder #CHANGE THIS}", | |
"localSourceRoot": "~/{$HomeProyectForlder #CHANGE THIS}" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment