I'm using Laravel Sail for my development environment and I'm wanting to use Xdebug to debug my PHP Laravel code.
I've set up Xdebug as per the documentation here: https://laravel.com/docs/9.x/sail#debugging-with-xdebug
However, the documentation only shows how to Xdebug from a browser or debugging CLI commands, what about APIs? If I set a breakpoint in my PHP code and use Postman to send an API request it does not hit any breakpoints. As a quick test, I opened my browser with the Xdebug extension and typed in the API url, the breakpoint works.
This is NOT the way I want to be debugging my code, I can't debug my APIs properly because they require certain parameters and body contents with certain headers which I can't do in a browser.
So this begs the question, how do you APIs using Xdebug in Laravel Sail?