Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Go to `Settings/Languages & Frameworks/PHP`.
- 2. Set `PHP language level` to `7`.
- 3. Click button `...` of `Interpreter` input.
- 4. Click the `+` icon to add new interpreter.
- 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`
- 6. Save changes.
- 7. Go to `Settings/Languages & Frameworks/PHP/Servers`.
- 8. Click the `+` icon to add new server.
- 9. Enter the following: `Name: homestead.local`, `Host: homestead.local` `Port: 80`, `Debugger: Xdebug`
- 10. Check `Use path mappings`.
- 11. Add mappings: `C:/path/to/project` > `/home/vagrant/path/to/project`, `C:/path/to/project/public` > `/home/vagrant/path/to/project/public`
- 12. Save changes.
- 13. Click `Start Listening for PHP Debug Connections` in PHPStorm interface (at the top-right corner).
- 14. Install `xdebug helper` Chrome extension and set `IDE key: PHPSTORM` in configuration.
- 15. Go to `homestead.local` and enable `xdebug helper` Chrome extension.
- 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.
- 17. Now you can set breakpoints and start debugging!
Add Comment
Please, Sign In to add comment