The words PHPStorm
write code to be very sense, various hints complement and error correction, and in L5
the namespace function is more powerful to be moved (new class automatically adds namespaces, automatically introduces namespaces, returns parameter namespace corrections, etc.). Of course, its debugging function is to let you in the presence BUG
of confusion when grasping the straw.
Below I will take you step by step to configure this powerful to burst function. However, this configuration is very simple.
Assuming you've installed Phpstorm and Homestead, as well as chrome, you're not taught this anymore.
Configuring Xdebug in Homestead
1. Start your Homestead
, and connect to it (follow laravel
the tutorial, enter it under Mac vm
)
2. Under command linesudo vi /etc/php5/fpm/conf.d/20-xdebug.ini
3. Copy the following contents in
zend_extension=119000xdebug.scream=0 Xdebug.cli_color=1xdebug.show_local_vars=1
4. Save this file (if this file does not exist, then create a soft link to come over sudo ln -s /etc/php5/mods-available/xdebug.ini /etc/php5/fpm/conf.d/20-xdebug.ini
)
5. Restart php5-fpm
:sudo service php5-fpm restart
Configure Phpstorm
1. Install Chrome Extensions Xdebug Helper.
2. Enter the configuration option for Xdebug Hepler, and select IDE key as Phpstorm.
3. Adjust the extension to debug mode,
4. Open your phpstorm and set a test breakpoint.
5. Turn on Run>start Listening for PHP Debug Connections in Phpstorm.
6. Refresh your previous page and you will find a dialog box and start debugging.
7. Finally set up some of your project directories, that is, your project directory corresponds to the directory you mapped to Homestead.
All right, knock it off! It's such a simple operation that you need to open Chrome's extension Xdebug set to debug so you can debug your page at any time.
Reprint: https://phphub.org/topics/553
Reference: Https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm
Phpstorm + Homestead + Xdebug + Chrome Xdebug Helper Debug Configuration