1. Install and configure Xdebug in Homestead virtual box
First run vagrant up and Vagrant Ssh,ssh remote to homestead in the terminal, then copy the following code into a shell file and execute it.
#!bash/BINCD~#download and UncompresswgetHttps//xdebug.org/files/xdebug-2.4.0.tgzTarXvzf xdebug-2.4.0. Tgz#compile and Make InstallCD Xdebug-2.4.0Phpize7.0./configure--enable-Xdebug Makesudo Make Installmkdir-p/usr/local/php/Xdebugsudo CP~/xdebug-2.4.0/modules/xdebug.so/usr/local/php/xdebug/xdebug.soCat>>xdebug.ini<<eofzend_extension="/usr/local/php/xdebug/xdebug.so"xdebug.remote_enable=1Xdebug.remote_connect_back=1Xdebug.remote_port=9000Xdebug.max_nesting_level= -EOFsudo CPxdebug.ini/etc/php/mods-available/Xdebug.inisudo LN-snf/etc/php/mods-available/xdebug.ini/etc/php/7.0/cli/conf.d/ --Xdebug.inisudo LN-snf/etc/php/mods-available/xdebug.ini/etc/php/7.0/fpm/conf.d/ --xdebug.iniservice PHP7.0-fpm Restartcd~sudo RM-R xdebug-2.4.0sudo RMxdebug-2.4.0. tgz
2. Install the Xdebug plugin according to the browser
Xdebug Helper for Chrome or jetbrains IDE support
Xdebug Toggler for Safari
3.PHPStorm Configuration Xdebug
3.1 Run->edit configurations on navigation ... Enter the following interface
Save settings based on settings.
Run debug, set breakpoints, and then run Run->debug, such as:
Run successfully ko!
Resources:
Https://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide
Local Xdebug Debug Build Laravel+homestead+phpstorm