I’m running LocalWP on my Mac Book Pro, and I didn’t install PHP or Composer locally on my machine since LocalWP handles all of that. Also, I’m using VSCode for coding, and I get this error message whenever I edit a PHP file:
Cannot validate since a PHP installation could not be found. Use the setting 'php.validate.executablePath' to configure the PHP executable.
I installed the Xdebug + VS Code add-on and tried again, but I got the same error. And I got the following error when I tried to run the PHP file in the Debug mode:
PHP executable not found. Install PHP and add it to your PATH or set the php.debug.executablePath setting
Does this happen for all sites in Local, or just one in particular? I have only one site.
Are you able to create a new, plain WordPress site in Local and access it in a Browser? Yes.
Which version of Local is being used? 6.3.0+5756
What Operating System (OS) and OS version is being used?
- macOS Monterey 12.2.1
Attach the Local Log. See this Help Doc for instructions on how to do so:
- local-logs.zip (5.1 KB)
Is there any way to make the VSCode recognize the PHP, Composer, and other installations that are already running with LocalWP? I don’t want to install another instance of each while I already have existing instances running.
And how to fix the Xdebug issue?