Created
January 21, 2019 08:44
-
-
Save asamofal/4cce7bb5b8ce48607e520dace9c82eb4 to your computer and use it in GitHub Desktop.
How to setup xdebug for remote debugging
This file contains hidden or 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
# install xdebug extension | |
apt install php-xdebug | |
# config xdebug | |
/etc/php/7.2/<fpm> or <apache2>/conf.d/20-xdebug.ini | |
zend_extension=xdebug.so | |
xdebug.remote_enable = 1 | |
xdebug.remote_connect_back = 0 | |
xdebug.remote_host = localhost | |
xdebug.remote_port = 9001 | |
xdebug.max_nesting_level = 512 | |
# open ssh session with port forwarding | |
ssh -R 9000:localhost:9000 <user>@<host> | |
# setup mapping in phpstorm | |
Settings => Languages and Frameworks => PHP => Servers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment