Mamp Xdebug Phpstorm



Very excited to present my own Setup Guide to get Xdebug, PhpStorm and MAMP to play nice together. Our goal here is to get remote debugging setup to be able to debug any line within a much bigger web app. In our case I am interested to debug WordPress Themes and Plugins without having to declare what file to start from.

YouTube Video Xdebug, PhpStorm and MAMP – OSX – Setup Guide

I know that MAMP has an ini for the server and the command line so I make sure they are identical. This is the xdebug section of the php.ini. I have disabled opcache so there are no conflicts. Not sure if there is anything else I should say about my php.ini file. Below is the xdebug section from a phpinfo page. This is more of a simple note to self. But after setting up a fresh computer, all of those fuzzy little bits about getting MAMMP to work perfectly slip my mind. The one thing that can be a little confusing with MAMP is the multiple config locations. For example, I am running PHP 7.1.8. Certainly, there is no need to use DrupalVM to debug Drupal migrations. And PHPStorm is not strictly required either. This is just a guide for those using this particular setup. DrupalVM was used because it standardizes the setup among different operating systems. If MAMP, LAMP, or WAMP were used, instructions would vary from one to another. Using PhpStorm, Xdebug, MAMP &.htaccess Follow. James Bredijk Created March 15, 2014 05:50. Hi, I'm new to PhpStorm and Xdebug, so please forgive what may be a.

As seen on: schurpf.com | Link to YouTube | Subscribe to my channel

Two different types of Xdebug modes

  • Direct (via command line)
  • Remote (via browser)

I am no expert on this topic, so apologize my language. If anybody knows the proper terminology, please leave them in the comments and I am more than happy to change this. Essentially you can find two types of debugging. Direct one and remote. The first one essentially is essentially like running php from your command line using Xdebug. So you need to know exactly where to start and all files you want to debug need to be somehow connected (told you I am no expert on this…). The second method is the remote debugging where anywhere in you code you set a break point and essentially trigger the debugging remotely, in our case a browser. This is what we want 🙂

Here is how those two options look like in PhpStorm:

There are plenty of steps to do in order to get this to work. Here is the step by step list.

Note I will be doing most work from the terminal. You should be able to copy paste all commands.

Here is my setup for this Setup Guide

  • MAMP 2.2
  • PhpStorm 8.0.1
  • OSX 10.7

Xdebug Phpstrom Mamp Install Guide

1. Find Your PHP version in MAMP

2. Set your PHP version globally (optional)

Either create or open your .bash_profile file in ~/.bash_profile

Type: open ~/.bash_profile or if your .bash_proile doesn’t exist touch ~/.bash_profile; open ~/.bash_profile

Phpstorm xdebug docker cli

enter the following at the bottom of your .bash_profile:

Restart your terminal.

Check your php version with:

which php

or

php -v

source: http://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path/10653443#10653443

3. Find your PHP ini file

Your php ini file will be in:

If you setup you MAMP PHP globally you can also do:

php --ini

or

php -r 'phpinfo();' | grep 'php.ini'

and find your php.ini path. Couldn’t help myself but geek out. Sorry…

Phpstorm Setup Xdebug

4. Add the remote session parameters to php.ini

Mamp

Open your php.ini file.

open /Applications/MAMP/bin/php/php5.5.3/conf/php.ini

Find the section Xdebug and uncomment (aka remove the semicolon) the zend_extension and add the following two options until your section looks like this:

Your Xdebug section should be at bottom of your php.ini file.

Make sure you restart your MAMP server after editing your php.ini file, otherwise your settings wont apply.

5. Install browser extension

The title says it all:

6. Set PhpStorm IDE key

Mamp Xdebug Phpstorm

In your Xdebug Helper browser extension go to Options via chrome://extensions/. The Xdebug Helper should be at the bottom. Set the IDE key to PhpStorm.

7. Start PhpStorm and setup project with localhost

Setup the project with PhpStorm. Make sure you set the correct project root and setup the localhost with the correct port.

In our case we will open project wp-test.

8. Turn on Listening for Debug Connections

Turn on via: Go to Run -> Start Listening For PHP Debug Connections

9. Start debugging in browser

Mamp Xdebug Phpstorm

Switch the little to Debug.

10. Set breaking points

Finally… In PhpStorm just click into the line on the left. Visual studio 2013 ultimate download iso.

11. Refresh browser

12. Accept remote connection in PhpStrom

Xdebug Phpstorm Cli

PhpStorm should recognize at this point the remote connection and ask you what you want to debug. Set your choice on your project root folder.

13. Fix mapping

Check the debugger for the mapping error and untick the mapping. You can now run the debugger and it will stop at your breaking point.

Phew we are all set. If all is working for you, you should now be ready to use Xdebug, PhpStorm and MAMP. If you have any questions I will do my best to help. Please consider though that I have very little experience in this.

Phpstorm Xdebug Not Working

Mamp Xdebug Phpstorm

Phpstorm Xdebug Ssh

The perfect season to determination soundness problem is before any visible sign appears. Actually there isn’t anything you can’t purchase on the Internet anymore. Whereas erectile dysfunction is more common among older men, that doesn’t some you just have to live with. What about “canadian pharmacy cialis 5 mg” and “cialis canadian pharmacy“? In our generation, there are divers options for those ones who suffer from erectile disfunction. You may have heard about “canadian pharmacy online cialis“. More information about the problem available at “canadian pharmacy cialis 20mg“. Why it happen? Can sexual disorders in men be prevented? If you get any prescription remedies like Viagra, check with a pharmacist that they are sure to take with your other remedies.