Tired of editing config files every goddam time after vagrant destroy? I've got you covered :D
-
Find where the
xdebug.sofile is. Store this value in a variable.EXT_PATH=$(sudo find / -name xdebug.so) -
Edit the given files (where
{EXT_PATH}is the value stored on 1.):-
Replace all contents from
/etc/php5/mods-available/xdebug.iniwith:zend_extension={EXT_PATH} xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_connect_back=on xdebug.remote_port=9000 xdebug.remote_autostart=0 xdebug.remote_log=/tmp/php5-xdebug.log xdebug.idekey=netbeans-xdebug- Optional: allow the user to define which is the
idekeythrough an external variable file.
- Optional: allow the user to define which is the
-
At the end of
/etc/php5/cli/php.iniand/etc/php5/fpm/php.ini, add the following lines:[xdebug] zend_extension="{EXT_PATH}" xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.max_nesting_level=1000
-
-
Restart PHP and HTTP server.
-
PROFIT!