Last active
March 20, 2016 17:06
-
-
Save labmonkey/e8d52dc3d878bbea3d60 to your computer and use it in GitHub Desktop.
The scotchbox Vagrantfile with added xdebug. Tested and working with PHPStorm.
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "scotch/box" | |
| config.vm.network "private_network", ip: "192.168.33.10" | |
| config.vm.hostname = "scotchbox" | |
| config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"] | |
| # Optional NFS. Make sure to remove other synced_folder line too | |
| #config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] } | |
| config.vm.provision "shell", inline: <<-SHELL | |
| sudo apt-get update | |
| sudo apt-get install php5-xdebug php5-dev | |
| XDEBUG_PATH=$( find /usr -name 'xdebug.so' | head -1 ) | |
| sudo truncate -s 0 /etc/php5/apache2/conf.d/20-xdebug.ini | |
| echo "; xdebug | |
| zend_extension=\"$XDEBUG_PATH\" | |
| xdebug.remote_connect_back = 1 | |
| xdebug.remote_autostart = 0 | |
| xdebug.remote_enable = 1 | |
| xdebug.remote_handler = \"dbgp\" | |
| xdebug.remote_port = 9000 | |
| xdebug.remote_mode = \"req\" | |
| xdebug.var_display_max_children = 512 | |
| xdebug.var_display_max_data = 1024 | |
| xdebug.remote_host = \"192.168.30.10\" | |
| xdebug.idekey = \"SCOTCHDEBUG\" | |
| xdebug.var_display_max_depth = 10" >> /etc/php5/apache2/conf.d/20-xdebug.ini | |
| sudo service apache2 restart | |
| SHELL | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment