![]() ![]() The crucial part, I found to making the code stepper work in VSCode was the xdebug.idekey = VSCODE line. I’ve added this below the entries for opcache but before the entries: settings that Flywheel added and have replaced with the following. This can be found in site-folder > conf > php > where site-folder is the folder of your site, which can be reached by clicking the ‘Go to site folder’ under the name of the site in Local. Moving to the php.ini file, which’ll need modification. I’ve then edited this to use port 9003 instead of 9000 as Xdebug 3 uses port 9003 where as Xdebug 2 (which the extension supports), uses 9000. If you use the Xdebug + VSCode extension in local, clicking the link under Tools > Xdebug + VS Code > Add run configuration to VS Code will add the required. This put a php executable at /opt/homebrew/bin/php so I added this to my settings.json file in VSCode in the following way: I felt this was close enough to Local’s version of PHP but you can specify other versions if you need to. I did this using brew install php, which installed version 8.1.10. I’m not sure if this next bit is needed but I installed PHP 8 at the system level (since it’s no longer installed by default in macOS Monterey). Moving to VSCode, you need to have this PHP Debug extension installed and activated: PHP Debug - Visual Studio Marketplace vscode folder with the launch.json file inside but it’s not currently fully compatible with Xdebug 3, so I’ve tweaked the output. It certainly helps as a one-click solution to create the required. I have been using the Xdebug + Local extension, which can be found here: GitHub - pixeljar/local-addon-xdebug-vscode Database: MySQL (not sure this is important). ![]() Web server: nginx (not sure this is important).Local > Preferences > Advanced > Router mode > Site DomainsĪnd then using the following site settings:.I was able to get the code stepper to work by using the following Local settings: Any site using PHP 7.4 uses Xdebug 3 on port 9003 in Local.I’m using a Mac running macOS Monterey and Local 6.4.3. I’m 90% there but there’s one more thing I need to fix. It used to work perfectly but at some point in the last 2-years it’s broken. Spent most of yesterday fiddling with Xdebug trying to get it to work. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |