8/24/2023 0 Comments Mamp setupYou’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. 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. ![]() Michael Novotny How to Setup and Configure Phpstorm, Xdebug, and Mamp for Debugging January 6, 2015
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |