MAMP fine tuning: enable XDEBUG and turn on error reporting

MAMP addresses developers, so I can’t really understand why these are turned off by default:

  1. Enable XDEBUG:
    • nano/vim /Applications/MAMP/bin/php/php5.6.10/conf/php.ini
      (Note: you may be using another version of PHP)
    • Search for “xdebug”
    • Delete the semicolon
    • Restart MAMP (or just Apache)
    • Test with phpinfo(); It should show as compiled
      compiled-xdebug-in-php
  2. Enable PHP Error Reporting: 
    • nano/vim /Applications/MAMP/bin/php/php5.6.10/conf/php.ini – same file as above
      (Note: replace php5.6.10 with your PHP version)
    • Search for “display_errors”
    • Change from “off” to “on”
    • Restart MAMP or just Apache

Happy debugging!