Hey @scottbuscemi ā Thanks for bringing this up!
Anytime Iām using Xdebugās step debugger, I always feel like Iām casting a complicated spell. That being said, letās see how we can help!
The first thing Iām curious about is what editor you are using to connect to Xdebug?
When troubleshooting this, the main thing to keep in mind is that the newer versions of lightning services are using Xdebug 3.x whereas the older PHP versions were typically using 2.9.x. Because Xdebugās default port was changed from 9000 to 9003, youāll likely need to adjust a setting with the various configuration files.
I bring that up because I notice that you mentioned using PHP 8.0.0
. I ran a few tests to try and replicate the issue.
For these tests, I used these settings:
- M1 mac
- The āXdebug + VSCodeā addon installed from within Local (ie, I wasnāt running it from the master branch
- Latest stable Local, 6.4.3
For PHP 8.0.0, I was able to get it working with the above settings out of the box. Note that the 8.0.0
version of PHP is still running Xdebug 3.0.0, but using Port 9000.
For PHP 8.0.22, I had to update the launch.json
file to use port 9003 instead of 9000. But otherwise it worked.
For troubleshooting this, Iād recommend looking at a few places:
-
For the server side and PHPās settings, click the āiā button next to the PHP version in Local. This will open the phpinfo()
for the site. You can search for Xdebug to find those settings, and in particular, the xdebug.client_port
setting. Newer versions of Xdebug should have a value of 9003.
-
For the editor side (I used VS Code) open the .vscode/launch.json
file and verify that its port
value is the same as the one in Xdebug.
One thing I did notice while testing, was that the latest code on the master
branch of the Xdebug + VSCode addon has a configuration option to use that default port of 9003 (thanks @afragen for that commit! ). I think that should new item should make most things work out of the box, so Iām creating a task for us to publish a new release of that addon to the Addon Library. That way users that install the addon from within Local will get that latest change.
Anyway, thatās a lot of info, but hopefully it gives you a little direction of where to look to troubleshoot. Let us know a little more detail about what youāre trying and what editor youāre using, and we can help take a closer look!