Setting up XMAPP on a mac with xdebug

This post is about setting up XMAPP on a mac with xdebug.

The first thing we are going to do is to change the document root inside xampp to the ‘Sites’ folder. Changing the DocumentRoot has a few benefits – one being that its far easier to get to in the finder and your editor!

Changing the DocumentRoot in XAMPP

  • Install xampp from apachefriends.org
  • open /Applications/XAMPP/xampfiles/etc/ in finder; right click > get info
    make sure its read / write by everyone
  • open /Applications/XAMPP/xampfiles/etc/httpd.conf
  • scroll down to ‘DocumentRoot’
  • type in the location of your ‘sites’ folder [ /Users/username/Sites ]
  • scroll down to the <Directory> config
  • replace /Applications/XAMPP/xamppfiles/htdocs with /Users/username/Sites
  • save
  • restart apache
  • goto http://localhost to see what you have =)

setting up xDebug

This will allow you to have proper debugging for your php apps. In the long run this will save you hours of time.

This Post Has 2 Comments

  1. shaack

    This dont works, because there are no “xDebug lines” at the end of the php.ini

  2. Sachin Sharma

    [XDebug] is the forth last tag in the php.ini file. last one is [eAccelerator] .

Leave a Reply