Guest User

Untitled

a guest
Mar 12th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 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: `SSH Credentials`, `Host: 127.0.0.1` `Port: 2222`, `Username: vagrant`, `Auth type: Password`, `Password: vagrant`, `PHP executable: /usr/bin/php`
  10.  
  11. 6. Save changes.
  12.  
  13. 7. Go to `Settings/Languages & Frameworks/PHP/Servers`.
  14.  
  15. 8. Click the `+` icon to add new server.
  16.  
  17. 9. Enter the following: `Name: homestead.local`, `Host: homestead.local` `Port: 80`, `Debugger: Xdebug`
  18.  
  19. 10. Check `Use path mappings`.
  20.  
  21. 11. Add mappings: `C:/path/to/project` > `/home/vagrant/path/to/project`, `C:/path/to/project/public` > `/home/vagrant/path/to/project/public`
  22.  
  23. 12. Save changes.
  24.  
  25. 13. Click `Start Listening for PHP Debug Connections` in PHPStorm interface (at the top-right corner).
  26.  
  27. 14. Install `xdebug helper` Chrome extension and set `IDE key: PHPSTORM` in configuration.
  28.  
  29. 15. Go to `homestead.local` and enable `xdebug helper` Chrome extension.
  30.  
  31. 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.
  32.  
  33. 17. Now you can set breakpoints and start debugging!
Add Comment
Please, Sign In to add comment