Last active
March 19, 2017 14:52
-
-
Save labmonkey/4ecb8e4b5ddcb3a3c05eeba04aa67ee9 to your computer and use it in GitHub Desktop.
Laravel after.sh file which enables xdebug properly (tested in 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
| #!/bin/sh | |
| # If you would like to do some extra provisioning you may | |
| # add any commands you wish to this file and they will | |
| # be run after the Homestead machine is provisioned. | |
| # might be /etc/php/7.0/fpm/conf.d/20-xdebug.ini depending of homestead verison | |
| FILE=/etc/php/7.1/fpm/conf.d/20-xdebug.ini | |
| sudo chmod 777 "$FILE" | |
| sudo truncate -s 0 "$FILE" | |
| # Adding configuration params to xdebug.ini | |
| xdebug="zend_extension=xdebug.so | |
| xdebug.cli_color=1 | |
| xdebug.show_local_vars=1 | |
| xdebug.remote_enable=1 | |
| xdebug.remote_connect_back=1 | |
| xdebug.remote_port=\"9000\" | |
| xdebug.idekey=phpstorm | |
| xdebug.scream=0 | |
| xdebug.max_nesting_level=300 | |
| " | |
| echo "$xdebug" >> "$FILE" | |
| # might be php7.0-fpm depending of homestead verison | |
| sudo service php7.1-fpm restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment