Created
September 7, 2013 01:52
-
-
Save delphian/6472109 to your computer and use it in GitHub Desktop.
Configure Intellij to debug php scripts running on a virtual machine using xdebug
This file contains 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
# Configure intellij by adding new PHP Server | |
IntelliJ IDEA -> Preferences -> PHP -> Servers | |
# Configure Intellij by adding new Run/Debug Configuration | |
Add new 'PHP Web Application' and select the server name created above. | |
# Run from host to forward 9000 out of virtual machine back to host listener. | |
ssh -p 2222 [email protected] -R 9000:localhost:9000 | |
# Edit xdebug configuration in virtual machine | |
sudo vi /etc/php5/conf.d/20-xdebug.ini | |
# Add lines: | |
xdebug.remote_enable = On | |
xdebug.remote_connect_back = On | |
xdebug.remote_log = /tmp/xdebug.log | |
# Restart apache in virtual machine | |
sudo apachectl restart | |
# Verify apache is listening to 80 | |
sudo netstat -plnt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment