Mac Phpstorm Xdebug



By default your PHP file (located in /usr/local/etc/php/7./php.ini) is shared between command-line PHP and PHP-FPM. I recommend that you make copy of that file into php-fpm-fcgi.ini which will. You can enable Xdebug within MAMP by checking the Activate Xdebug option under the PHP tab. And that should be it, at least for MAMP 3. For most of you reading this, you can just stop here and move onto the PhpStorm section. XDEBUG 3 Configuration with Docker and PhpStorm XDebug 3 only started working out of the box with PhpStorm version 2020.3. Reference article - Configure Xdebug The list of changes from XDebug 2 to 3 are available here for reference - Upgrade Guide.

  1. Xdebug Xampp Phpstorm Mac Os X
  2. Mac Xdebug Phpstorm Docker
  3. Phpstorm Xdebug Docker Cli

In an earlier post I demonstrated how to install PHP5.4 using brew. Today, I required xdebug for debugging purposes and found it quite easy to install via homebrew.

Install XDebug for PHP
It’s as simple as issuing the command:

Phpstorm setup xdebug

We are all running PhpStorm 2020.3, and use the Chrome Xdebug helper plugin (with 'phpstorm' set as the IDE key). I have set up this configuration at least 2 dozen times (and wrote the company guide for setting up the dev environments including Xdebug), so it's a bit embarrassing that it won't work on newer Macbooks. After doing this I can debug fine PHPStorm on Windows or MAC. This is in the PHPStorm Bug Tracker, WI-24944 and is open as a bug. Not really sure what can be done. When you use PHPStorm as the tool it is, at some point it is at the mercy of PHP the language.

zend_extension='/usr/local/Cellar/php54-xdebug/2.2.0/xdebug.so'

Follow the output of the brew info output of the package you installed (either php53 or php54):

PhpstormMac phpstorm xdebug not working
2
4
xdebug.remote_port=9000
xdebug.remote_host='localhost'

Debugging Web Applications
In the run configuration, add “Web Application” type. Configure the server and path as usual. When setup, you shall notice the debug button is active. Setup some break points and hit the debug button.

You can also use the “Listen PHP Debug Connection” option along with some xdebug bookmarklet for quick debugging.

Xdebug Xampp Phpstorm Mac Os X

Debugging Command Line Scripts
To debug command line scripts, first issue this command on terminal:

PS: I added the line to my ~/.bash_profile so that I don’t have to type it every time I login to bash shell.

Mac Xdebug Phpstorm Docker

Mac Phpstorm Xdebug

Turn on incoming connections by clicking the “Start Listen PHP Debug Connection” button. Set some break points and then run the script from command line. Ipad tunnelblick.

Phpstorm Xdebug Docker Cli