Xdebug is great for debugging your PHP code in real time. There are a few ways to install it on RHEL 8, but the simplest and most straightforward one utilizes packages found right in RHEL's repos.
This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-xdebug-on-redhat-8