I’m using Valet+ as my development environment on MacOS. It is easy to set up and it works fine for me but I did have problems with Xdebug. Xdebug was enabled by default, I created a` breakpoint in PhpStorm but Xdebug did not stop on my breakpoint. So what was the problem?
It happened because PhpStorm mapped incorrect file to debug. Check the screenshot.
It wanted to debug some codeception/codeception/tests/data/rest/server.php
file. But it’s wrong.
You need to ignore all requests with incorrect project or file to debug. Just click Ignore.
Then you need to go to PhpStorm Preferences -> Languages & Frameworks -> PHP -> and specify include path to the correct Valet+ folder.
The correct folder name is <your_home_directory>/.composer/vendor/weprovide/valet-plus
After that go to your browser and refresh your page you want to debug with enabled Xdebug. Now in your PhpStorm you will get Xdebug popup with correct file to debug: <your_home_directory>/.composer/vendor/weprovide/valet-plus/server.php
Click Accept now.
Now Xdebug will stop your you breakpoint. Congratulations!