Skip to content

Instantly share code, notes, and snippets.

@tahirm
Created September 12, 2014 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tahirm/2d397fb87014041c4ca5 to your computer and use it in GitHub Desktop.
Save tahirm/2d397fb87014041c4ca5 to your computer and use it in GitHub Desktop.
Debug php application on remote server through ssh tunnel with xdebug and netbeans. #xdebug #netbeans #ssh http://www.davidlaing.com/2012/07/29/howto-configure-netbeans-php-debugging-for-a-remote-server-over-a-ssh-tunnel/
1. apt-get install php5-xdebug
2. vi /etc/php5/apache2/conf.d/xdebug.ini
3.
zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
4. restart apache2
5. Create remote->local SSH tunnel 'ssh -R 9000:127.0.0.1:9000 yourname@yourserver.com'
6. Launch Netbeans debugger
Copy link

ghost commented Sep 4, 2020

Thank you for this information. I just created a video explaining a similar setup. https://www.youtube.com/watch?v=9uf7sUCAcRE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment