Advertisement
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:<br>
-  `SSH Credentials`<br>
-  `Host: 127.0.0.1` `Port: 2222`<br>
-  `Username: vagrant`<br>
-  `Auth type: Password`<br>
-  `Password: vagrant`<br>
-  `PHP executable: /usr/bin/php`<br>
- 6. Save changes.
- 7. Go to `Settings/Languages & Frameworks/PHP/Servers`.
- 8. Click the `+` icon to add new server.
- 9. Enter the following:<br>
-  `Name: homestead.app`<br>
-  `Host: homestead.app` `Port: 80`<br>
-  `Debugger: Xdebug`<br>
- 10. Check `Use path mappings`.
- 11. Add mappings:<br>
-  `C:/path/to/project` > `/home/vagrant/project`<br>
-  `C:/path/to/project/public` > `/home/vagrant/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.app` 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!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement