

There is the MAMP Pro version, which supports some of these but not all of them. Moreover, it also does not support Xcache, Python, Perl, XDC, SQLBuddy, Xdebug, or Apache Tomcat. There is no support for other types of databases, such as SQLLite. It only offers basic web server components using MySQL as its main database system. However, unlike other open-source competitors, MAMP is rather subpar when it comes to the range of installed components. Simply put, MAMP is in itself a comfortable way to test web pages and web apps locally without accessing the internet. You can manage MySQL databases and run SQL statements via the PHPMyAdmin, while the PHP distribution makes it possible for web developers to create their websites. You can even manage the webserver without so much hassle. If everything is wired up correctly, you should hit your breakpoint.Thanks to the app’s intuitive and simple interface, you can start and stop the servers, change the used ports, and choose the PHP distribution version cache easily. Set a breakpoint in PhpStorm by clicking in the margin of an open PHP file, click the “bug” next to the configuration you just created to start debugging. Once this is complete, you should see the Debug configuration you just created in the upper right part of PhpStorm. If you're running just MAMP (the non-pro version) or if you didn't create a custom host, or if you didn't customize the ports within MAMP, then you'd probably be using localhost with a port of 8888 for the configuration below. For this example, I’ve created the host v in MAMP PRO (which is also shown in the screenshots above) and I customized my MAMP Apache port to run on port 80. You’ll use whatever host and port you’ve configured within MAMP.

In short, we need to point PhpStorm to the server we want to debug. Instead, I created a short GIF to demonstrate what needs to happen. If I were to type out everything you’d need to do, it’d be very lengthy. With PhpStorm open, navigate to Run > Edit Configurations. zend_extension="/Applications/MAMP/bin/php/php5.3.29/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" Please note that the zend_extensions path to the xdebug.so file will vary depending on the PHP version you're using, so make sure you look up the correct path on your filesystem. MAMP 2 used to require a bit more configuration, specifically the definition of a zend_extension, so you might want to add all of the following if the minimum configuration doesn’t work for you or if you want to enable things like coverage and profiling capabilities. With the php.ini file open, you'll want to find the section, which is usually at the very bottom of the file.Īt the very minimum, you’ll want to have the following entered and uncommented. With the PHP version identified, you’ll want to open and edit the corresponding php.ini file to enable Xdebug by navigating to File > Edit Template > PHP > PHP php.ini. If you’re running a more advanced setup in MAMP PRO, with different PHP versions for each hosts, head to your Hosts section to see what PHP version you’re running for the particular host you’re wanting to debug.

Simply navigate to the PHP section in MAMP and take note of what you’re default PHP version is. However, if you are using an older verion of MAMP, or if you want to ensure that MAMP 3 is indeed configured correctly, you’ll first need to identify what version of PHP you’re using with MAMP. And that should be it, at least for MAMP 3.įor most of you reading this, you can just stop here and move onto the PhpStorm section. You can enable Xdebug within MAMP by checking the Activate Xdebug option under the PHP tab.
#MAMP UPDATE XDEBUG INSTALL#
Xdebugįortunately, Xdebug is already included with MAMP, so there is nothing we need to install in addition to MAMP itself. I also assume that most of this is applicable to the regular, non-pro version of MAMP, though I have not tested it. The same process should also work for MAMP PRO 2 - 4 and for PhpStorm 7 - 2016.2. The screenshots below are from MAMP PRO 3 and PhpStorm 8. So your initial setup isn’t as frustrating as mine was, I thought I'd share how I was able to get it all wired up and hopefully save you some time. After a few days mucking with everything, I was able finally able to get it figured out. Each article seemed to be missing one key piece of the puzzle. I must have read 8 - 10 articles scattered about the internet to finally get PhpStorm setup to do debugging with Xdebug and MAMP.
#MAMP UPDATE XDEBUG HOW TO#
Michael Novotny How to Setup and Configure Phpstorm, Xdebug, and Mamp for Debugging January 6, 2015
