Installing Xdebug on Homestead 7.0, PHP 7.2

As of recently it seems a fresh install of laravel homestead does not bring Xdebug setup out of the box. This seems to be confirmed from issue #800 on laravel’s github. https://github.com/laravel/homestead/issues/800

If you can’t wait for the new release here is the quick manual setup of xdebug.

Steps

Step 1) Download, unzip and compile Xdebug 2.6

Step 2) Copy generated xdebug.so to proper location

Step 3) Create Xdebug config file

with content

Step 4) Enable Xdebug

Step 5) Restart php process manager

Step 6) Cleanup

We can now remove the source directory and zip

Extra

The above steps will enable Xdebug for the browser interpreter only so don’t be alarmed if you don’t see Xdebug listed when running php from the command line.

To also enable Xdebug for the CLI run this command:

and restart:

You should now see Xdebug properly loaded:

Conclusion

Done.

Unhandled — Code

Tips and Tricks on coding languages and environments

Unhandled Perfection

Written by

Unhandled — Code

Tips and Tricks on coding languages and environments