Setting up a debugger for PHP using PHPStorm and XAMPP

Start out by installing phpstorm and xampp.

Follow the process in here:
https://www.techflirt.com/install-configure-xdebug-on-xampp-windows-and-mac/

For the above process, don't forget to install xdebug for the version of php in xampp, and not the OS version:

/Applications/XAMPP/bin/php -v

Make sure you do everything in here:
https://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide

Be sure to validate that the debugger configuration is set up properly:
https://confluence.jetbrains.com/display/PhpStorm/Validating+Your+Debugging+Configuration

If you need to test with requests, you can do so by doing the following:

  1. Go to Run
  2. Edit Configurations
  3. Click +
  4. Select PHP HTTP Request
  5. Select your XAMPP server for the Server:
  6. Specify the URL for the page you want to test
  7. If you need to do a POST, specify the request method and put the post information in the Request body.
  8. Click OK