Skip to content

Instantly share code, notes, and snippets.

@funkatron
Last active September 8, 2016 19:21
Show Gist options
  • Save funkatron/9915279 to your computer and use it in GitHub Desktop.
Save funkatron/9915279 to your computer and use it in GitHub Desktop.
Settings for XDebug and Codebug so PHP debugging actually fucking works
Codebug config======================
Paths
LOCAL REMOTE
/local/path/to/php/app /server/path/to/php/app
xdebug config=======================
root@ed:/vagrant/projects/acp/frontend/app# more /etc/php5/fpm/conf.d/20-xdebug.ini
; configuration for php xdebug module
; priority=20
zend_extension=/usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
Codebug=====================
Hit the Power button so it glows: http://img.spz.im/yzZSt.png
Make a request to server, Codebug should break on first line.
@tylerdigital
Copy link

Thanks, I've gotten closer with this info than I ever have before. Now Codebug breaks on the first line, but it isn't catching any of my breakpoints.

@funkatron I'm still struggling with this setup, I'm wondering if this part is required (and if you could provide a sample or two of what should be there?)
LOCAL REMOTE
/local/path/to/php/app /server/path/to/php/app

Thanks for any pointers

@pabloselin
Copy link

Thanks for the tip,

@tylerdigital, here is what i've put in my LOCAL REMOTE mapping in order to get it working:

LOCAL:

/Users/{username}/{vagrantbox}/{wordpress-folder}/wp-content/plugins/{my-plugin-name}

REMOTE:

/var/www/public/wp-content/plugins/{my-plugin-name}

I'm debugging a WordPress plugin but I imagine it will work with any php code.

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