Last active
February 29, 2016 03:37
-
-
Save rafaelrozon/ca7558fa54b9cfaa0015 to your computer and use it in GitHub Desktop.
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
1. homestead ssh | |
2. php -i | |
3. copy output and paste in https://xdebug.org/wizard.php | |
4. install Xdebug | |
5. Xdebug settings go in fpm/php.ini. Example: | |
[XDebug] | |
zend_extension="/usr/lib/php5/20131226/xdebug.so" | |
xdebug.remote_enable=true | |
xdebug.remote_port=9000 | |
xdebug.profiler_enable=1 | |
xdebug.remote_connect_back = 1 | |
xdebug.scream=0 | |
xdebug.cli_color=1 | |
xdebug.show_local_vars=1 | |
6. homestead exit | |
/// INTELIJ | |
7. Create a server. Settings > Languages & Frameworks > PHP > Servers | |
host: homestead.app | |
port: 8000 | |
debugger: Xdebug | |
check "Use mappings....", but don't specify anything yet | |
8. Edit configurations | |
9. Create PHP Web Application | |
10. Select the previous server just created | |
Start url: / | |
click OK | |
11. Set a breakpoint somewhere | |
12. Click the Bug icon on the top close to the configurations. It'll launch the browser but it will not work. | |
13. On the debugger tab you'll see something like "Fix file mappings" | |
14. Go to Edit configurations and match the local root folder to the project root server in homestead. | |
15. Run debug again to see if it works. | |
16. Boom done!!! | |
References: | |
http://laravelista.com/debugging-a-laravel-web-application-with-phpstorm-on-homestead/ | |
https://dillieodigital.wordpress.com/2015/02/24/how-to-debug-laravel-apps-in-phpstorm/ | |
https://xdebug.org/wizard.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment