https://dev.to/scriptmint #i-always-found-setting-up-xdebug-as-one-of-the-most-difficult-job-but-today-i-did-it-under-5-minutes I always found setting up Xdebug as one of the most difficult job. If you don't use right tool for debugging, you may end up spending your whole day by doing nothing.
Next, you need to install Xdebug PHP Extension which you can install using below command.
Next, Open VS Code & Install PHP Debug Extension.
By default Xdebug is listening to port 9003 as you can see in the VS Code PHP Debug extension.