Created
November 22, 2014 02:55
-
-
Save xhezairbey/561c2bc0341cb6b1ea17 to your computer and use it in GitHub Desktop.
OS X Mavericks built-in PHP w/ Xdebug
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
| # get xdebug | |
| git clone https://github.com/derickr/xdebug.git | |
| cd xdebug | |
| phpize | |
| ./configure --enable-xdebug | |
| # run | |
| make | |
| # move to it's own palce | |
| cp -r modules/ /usr/local/xdebug | |
| # edit php.ini to load xdebug | |
| [xdebug] | |
| zend_extension = "/usr/local/xdebug/xdebug.so" | |
| # optional: xdebug config | |
| xdebug.file_link_format = "txmt://open?url=file://%f&line=%l" | |
| xdebug.remote_enable = on | |
| xdebug.remote_autostart = 1 | |
| # host and port to listen to | |
| xdebug.remote_host = (e.g. localhost) | |
| xdebug.remote_port = (default 9000) | |
| # using WebGrind Profiler | |
| xdebug.profiler_enable = 0 | |
| xdebug.profiler_output_dir = "/Users/yourname/Sites/webgrind/temp/" | |
| # restart apache | |
| sudo apachectl restart | |
| # one line fast copy-paste method | |
| # http://stackoverflow.com/a/20621223 | |
| # sudo sh -c 'echo zend_extension=$(find /usr/lib/php/extensions -name "xdebug.so") >> $(php -qr "echo php_ini_loaded_file();") && apachectl restart' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment