

#PHPSTORM CLI INTERPRETER CODE#
If you don’t have the code alias configured, you can use nano: $ nano /usr/ local/etc/php/7.4/conf.d/xdebug.ini This opens Visual Studio Code for me (I use it for light text editing that doesn’t require PhpStorm). $ code /usr/ local/etc/php/7.4/conf.d/xdebug.ini Since the /usr/local/etc/php/7.4/conf.d directory is scanned automatically, we can put our Xdebug configuration here. I’m creating a new file in the terminal and opening it with Visual Studio Code, but you can do this manually. We’ll create our Xdebug configuration in a separate file. usr/local/etc/php/7.4/conf.d/php-memory-limits.ini ini files parsed: /usr/local/etc/php/7.4/conf.d/ext-opcache.ini, ini files in: /usr/local/etc/php/7.4/conf.dĪdditional. Loaded Configuration File: /usr/local/etc/php/7.4/php.ini Let’s locate that file by typing php -ini, which will tell us where our ini files live: $ php -iniĬonfiguration File (php.ini) Path: /usr/local/etc/php/7.4 But we need to set it up with another port as well.Īdditionally, if you see the following message (“Cannot load Xdebug - it was already loaded”) it’s probably because you have zend_extension="xdebug.so" in your php.ini file twice.

#PHPSTORM CLI INTERPRETER MAC#
Note: If you frequently switch between different versions of PHP, you may want to check out my Mac GUI, PHP Monitor. With Xdebug v3.0.0, Copyright (c) 2002-2020, by Derick Rethans
#PHPSTORM CLI INTERPRETER INSTALL#
$ pecl install xdebugĪfter running this command, running php -v should say: PHP 7.4.12 (cli) (built: 18:37:21) ( NTS ) Next up, we’ll want to make sure to install the latest version of Xdebug via pecl. That means we’re on the right track so far. With Zend OPcache v7.4.12, Copyright (c), by Zend Technologies Zend Engine v3.4.0, Copyright (c) Zend Technologies Paths referenced below might differ slightly if your Homebrew installation is located in /opt/homebrew. Note: If you are on an Apple Silicon-based Mac and you installed Homebrew without Rosetta, the Homebrew binaries can be found in /opt/homebrew/bin, as opposed to being located in /usr/local/bin. Let’s make sure php and pecl are installed and linked correctly.Īssuming you use Homebrew, your terminal output will be: $ which php Setting up Xdebugīefore we begin, I assume you have Laravel Valet installed. If you’re looking to set up a different environment (or would like to see a video), take a look here. Xdebug 3.0 has now been released, and some changes have been made to this guide to reflect this change. This is both for myself for future reference, and for anyone who stumbles upon this post and finds it helpful. After watching a stream where Matt Stauffer and Derick Rethans (the creator of Xdebug) discussed setting up Xdebug with Visual Studio Code, I decided it might be helpful to write a post on setting up Xdebug with PhpStorm, specifically if you’re running Laravel Valet.
