Advertisement
Guest User

Untitled

a guest
Apr 6th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. 1. Go to `Settings/Languages & Frameworks/PHP`.
  2.  
  3. 2. Set `PHP language level` to `7`.
  4.  
  5. 3. Click button `...` of `Interpreter` input.
  6.  
  7. 4. Click the `+` icon to add new interpreter.
  8.  
  9. 5. Enter the following:<br>
  10. &emsp;`SSH Credentials`<br>
  11. &emsp;`Host: 127.0.0.1` `Port: 2222`<br>
  12. &emsp;`Username: vagrant`<br>
  13. &emsp;`Auth type: Password`<br>
  14. &emsp;`Password: vagrant`<br>
  15. &emsp;`PHP executable: /usr/bin/php`<br>
  16.  
  17. 6. Save changes.
  18.  
  19. 7. Go to `Settings/Languages & Frameworks/PHP/Servers`.
  20.  
  21. 8. Click the `+` icon to add new server.
  22.  
  23. 9. Enter the following:<br>
  24. &emsp;`Name: homestead.app`<br>
  25. &emsp;`Host: homestead.app` `Port: 80`<br>
  26. &emsp;`Debugger: Xdebug`<br>
  27.  
  28. 10. Check `Use path mappings`.
  29.  
  30. 11. Add mappings:<br>
  31. &emsp;`C:/path/to/project` > `/home/vagrant/project`<br>
  32. &emsp;`C:/path/to/project/public` > `/home/vagrant/project/public`
  33.  
  34. 12. Save changes.
  35.  
  36. 13. Click `Start Listening for PHP Debug Connections` in PHPStorm interface (at the top-right corner).
  37.  
  38. 14. Install `xdebug helper` Chrome extension and set `IDE key: PHPSTORM` in configuration.
  39.  
  40. 15. Go to `homestead.app` and enable `xdebug helper` Chrome extension.
  41.  
  42. 16. If you are using a REST Client, simply add `?XDEBUG_SESSION_START=PHPSTORM` at the end of the URL and `Cookie:XDEBUG_SESSION=PHPSTORM` to the request headers.
  43.  
  44. 17. Now you can set breakpoints and start debugging!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement