I have installed PHP from brew and it works just fine in VSCode, but in PhpStorm I am not able to configure the interpreter in order to debug my PHP code. In the configuration file, it says "PHP not installed" with a red icon, and the executable path is empty.
I am trying to debug just code, not a web page, so there is no need of Apache Server or other for now.
When executing php -v
on terminal, I get:
PHP 8.0.17 (cli) (built: Apr 5 2022 22:43:04) ( NTS ) Copyright (c)
The PHP Group Zend Engine v4.0.17, Copyright (c) Zend Technologies
with Zend OPcache v8.0.17, Copyright (c), by Zend Technologies
which tells me that this installed correctly.
CodePudding user response:
If you have more than one PHP version installed and want to use non-default PHP installation/version then use the path for that specific version.
Copy that full path from there (if there are more than one path then use the top most or the most desired one) and use it in the "PHP executable" field of the PHP Interpreters screen in PhpStorm.