If you’re trying to set up VSCode so that you can debug your custom WordPress plugin like me, you’ll probably want to use ‘PHP Debug’ to debug your PHP code at some point. Here is how you set the php.debug.executablePath so that VSCode can find Local’s PHP installation.
Step 1: Figure Out How You Installed Local
Depending on how you installed local, your PHP installations will be in one of two places:
- All Users: C:\Program Files (x86)\Local\resources\extraResources\lightning-services
- Current User: C:\Users\<your username>\AppData\Local\Programs\Local\resources\extraResources\lightning-services\
Note: If neither of those folders exist, there is another trick you can use to find your Local installation.
First, open up your tray, find the Local app, and right click on “Open file location”
This should take you to a shortcut
Right click on the shortcut and click “Open file location” again
Now, you should be in your Local installation directory
Step 2: Navigate to Your PHP Installation
From there, you should be able to navigate to resources\extraResources\lightning-services
Here, you should see all the tools you’ve installed through Local:
Navigate into the folder which contains the PHP installation you are using for your wordpress site, then navigate to bin\win64
Finally, you should see your .exe!
Step 3: Update php.debug.executablePath
Lastly, you can update your php debug executable path in VSCode. For me, this looks like:
Leave a Reply